// $G$ CSS-028 (0) method shouldn't include more then one return command. private static int CalculateDifferencePointsAfterChosenMovement(Board i_board, Movement i_movement, Player i_player) { Board tempBoard = new Board(i_board.BoardSize); tempBoard.Clone(i_board); tempBoard.ExcuteMovement(i_movement); int topPlayerPoints, bottomPlayerPoints; tempBoard.CalculatePointsOfPlayers(out topPlayerPoints, out bottomPlayerPoints); int deltaPoints = topPlayerPoints - bottomPlayerPoints; if (i_player.PlayerPosition == Player.e_PlayerPosition.Top) { return(deltaPoints); } else { return(-deltaPoints); } }
public Game Clone() { return(new Game(Board.Clone(), Turn)); }