Open JustinLiu2020 opened 1 year ago
You mean board.IsWhiteToMove
?
For example, before you make a move board.IsWhiteToMove
returns true for white.
Then when you call board.MakeMove(move)
, board.IsWhiteToMove
will return false for white, it is black's turn.
How do I check if it's white's turn? Here's the code :
using ChessChallenge.API; using System;
public class MyBot : IChessBot { //The idea is to check for checks, captures, and threats, and evaluate every possible one to check if it's a good move //If it is, then it's added to a list of good moves, and then the best one is chosen from that list //If there aren't any checks, captures, or threats, then it just uses a minimax algorithm to find the best move //The minimax algorithm is a bit slow, so I'm going to try to make it faster by using alpha-beta pruning
}