Beispiel #1
0
 public State(State state, Move move)
 {
     Player         = state.Opponent.Clear(move);
     Opponent       = state.Player.Play(move);
     PotentialMoves = new PotentialMoves(Player, Opponent);
     Allowed        = PotentialMoves.InRange[Opponent.KingX, Opponent.KingY] == false;
     Value          = Player.IsWhite ? Player.Value - Opponent.Value : Opponent.Value - Player.Value;
 }
Beispiel #2
0
 public State()
 {
     Player         = new PlayerState(PieceColor.White);
     Opponent       = new PlayerState(PieceColor.Black);
     PotentialMoves = new PotentialMoves(Player, Opponent);
     Allowed        = PotentialMoves.InRange[Opponent.KingX, Opponent.KingY] == false;
     Value          = Player.Value - Opponent.Value;
 }