cowbloke
cowbloke
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
do i close the channel or something?
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
cheers
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
heyy it worked
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
my thoughts exactly
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
how do i reload the cache on vs?
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
reloading godot doesn't do anything
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
i'll give it a go
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
they have a pretty deserted c# channel which is why i came here
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
i'll ask on their server instead
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
No description
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
i am using godot here
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
any solutions i find online about this error is adding the public keyword
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
there you go
29 replies
CC#
Created by cowbloke on 1/21/2025 in #help
✅ inaccessible due to its protection level error when the const i'm reaching is public
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChessEngine
{
public class FenParser
{

public const string startingFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";

readonly Dictionary<string, int> pieces = new Dictionary<string, int>
{
{ "p", 1 },
{ "n", 2 },
{ "b", 3 },
{ "r", 4 },
{ "q", 5 },
{ "k", 6 },
{ "P", 9 },
{ "N", 10 },
{ "B", 11 },
{ "R", 12 },
{ "Q", 13 },
{ "K", 14 }
};

public ChessBoard ParseFen(string FenString)
{
ChessBoard board = new ChessBoard();
string[] parts = FenString.Split(' ');

// Parse the pieces
int i = 0;
string boardfen = parts[0];

Dictionary<string, int> scores = new Dictionary<string, int> { { "p", 0b0001 } };

while (i < boardfen.Length)
{
if (char.IsDigit(boardfen[i]))
{
i += (int)char.GetNumericValue(boardfen[i]);
}
else if (boardfen[i] == '/')
{
i++;
}
else
{
board.Board[i] = pieces[boardfen[i].ToString()];
}
}

return board;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChessEngine
{
public class FenParser
{

public const string startingFen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";

readonly Dictionary<string, int> pieces = new Dictionary<string, int>
{
{ "p", 1 },
{ "n", 2 },
{ "b", 3 },
{ "r", 4 },
{ "q", 5 },
{ "k", 6 },
{ "P", 9 },
{ "N", 10 },
{ "B", 11 },
{ "R", 12 },
{ "Q", 13 },
{ "K", 14 }
};

public ChessBoard ParseFen(string FenString)
{
ChessBoard board = new ChessBoard();
string[] parts = FenString.Split(' ');

// Parse the pieces
int i = 0;
string boardfen = parts[0];

Dictionary<string, int> scores = new Dictionary<string, int> { { "p", 0b0001 } };

while (i < boardfen.Length)
{
if (char.IsDigit(boardfen[i]))
{
i += (int)char.GetNumericValue(boardfen[i]);
}
else if (boardfen[i] == '/')
{
i++;
}
else
{
board.Board[i] = pieces[boardfen[i].ToString()];
}
}

return board;
}
}
}
29 replies