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); }
public bool IsGameFinished() { return(BoardHandler.isFull(board.Points) || passedMovesCount == 2); }