/// <summary> /// Start the game and give the intial turn to the specified player /// </summary> /// <param name="startingPlayer">The player with the starting move</param> public void StartGame(Player startingPlayer) { blackPlayerInfo.Engine.CancelProcessing(); whitePlayerInfo.Engine.CancelProcessing(); boardRules.ResetBoard(board); view.SetBoardState(board.Copy()); view.ShowGameStart(); this.turn = GetPlayerInfo(startingPlayer); this.GameStep(); }
/// <summary> /// Construct a board presenter that will manage the given board view /// </summary> /// <param name="view">The board view</param> public BoardPresenter(IBoardView view) { this.view = view; this.board = new Checkerboard(); this.boardRules = new CheckersRules(); this.turn = blackPlayerInfo; boardRules.ResetBoard(board); view.SetBoardState(board.Copy()); }