private DiscColor ToggleDisc(ActivePlayer player) { var opponentsDisc = player.Disc == DiscColor.Black ? DiscColor.White : DiscColor.Black; if (Board.HasMoves(opponentsDisc)) { return(opponentsDisc); } if (Board.HasMoves(player.Disc)) { return(player.Disc); } return(null); }
private void OnGameStarted(ActivePlayer player, GameStatus currentState) { GameStarted?.Invoke(this, player, new GameStartedEventArgs(currentState, player)); }
private bool IsPlayersTurn(ActivePlayer player) => player.Disc == _discOfNextMove;