예제 #1
0
        public void MakeMove(Tuple <int, int> coolds)
        {
            if (GetAvailablePoints().Count == 0)
            {
                Pass();
            }
            else
            {
                passedMovesCount = 0;
            }
            List <List <Point> > points = BoardHandler.SetPoint(currentPlayerColor, coolds, board.Points);

            MoveMade?.Invoke(points);
            SwapTurn();
            AvailablePointsCalculated?.Invoke(GetAvailablePoints());
            CalculatePlayersScore(points);
            if (BoardHandler.isFull(points) || passedMovesCount == 2)
            {
                FinishGame(points);
                return;
            }
            board = new Board(points);
        }
예제 #2
0
 public bool IsGameFinished()
 {
     return(BoardHandler.isFull(board.Points) || passedMovesCount == 2);
 }