public void PlayAIGame() { while (!_game.IsGameFinished()) { CurrentPlayer.PlayTurn(this); } }
public void OnGameStateChanged(Object sender, EventArgs e) { _dropBoard.UpdateState(); if (_game.IsGameFinished()) { _mainForm.SetFinishedState(_game); _dropBoard.SetFinishedState(); } else { IPlayer player = (IPlayer)_game.CurrentPlayer; //Let the dropboard know what player's turn it is so that it //can display that information, and if the player is an AI, //give it control. _dropBoard.SetCurrentPlayer(player); } }