private void CreateNewGame(AdHocTest test) { int moves = test.PlayerMoves; if (moves == 0) moves = int.MaxValue; var board = this.boardControl.StartNew(test.GetPlayer(PlayerColor.White), test.GetPlayer(PlayerColor.Black), test.FEN); this.boardControl.Board.Start(); this.boardControl.Board.PieceMoved += move => { if (board.CurrentPlayer.PlayerColor == PlayerColor.White) return; moves--; if (moves == 0) board.Stop(); }; }
public AdHocOrchestrator(Form parentForm, BoardControl control, AdHocTest test) : base(parentForm, control) { this.startDate = DateTime.Now; this.test = test; }