SebLague / Chess-Challenge

Create your own tiny chess bot!
https://www.youtube.com/watch?v=Ne40a5LkK6A
MIT License
1.78k stars 1.07k forks source link

board.cs has an error. #472

Closed androur closed 9 months ago

androur commented 10 months ago

when I open my bot and click human vs bot, it gives me syntax error in board.cs on line 113.

androur commented 10 months ago

Now when I tried more, it seams that whatever I do, it gives the same error

Vanny-Chuck commented 9 months ago

Give us the errors so we can help!

androur commented 9 months ago

Exception has occurred: CLR/System.NullReferenceException An unhandled exception of type 'System.NullReferenceException' occurred in System.Private.CoreLib.dll: 'Object reference not set to an instance of an object.' at ChessChallenge.Chess.Board.MovePiece(Int32 piece, Int32 startSquare, Int32 targetSquare) in c:\Users\Win10.ANDRIJA\chess chalenge\Chess-Challenge-main\Chess-Challenge\src\Framework\Chess\Board\Board.cs:line 113

androur commented 9 months ago

Nvm, Its because I didn't place board.UndoMove() after board.MakeMove().