Exemplo n.º 1
0
 private void updatePlayerScoreInCurrentGame(CheckersPlayer i_Player, CheckersPlayer i_Opponent)
 {
     if (i_Opponent.IsWin)
     {
         i_Opponent.ScoreInCurrentGame = i_Opponent.GetPlayerPoints() - i_Player.GetPlayerPoints();
     }
     else
     {
         i_Player.ScoreInCurrentGame = i_Player.GetPlayerPoints() - i_Opponent.GetPlayerPoints();
     }
 }
Exemplo n.º 2
0
        internal bool IsValidPointsDifference(CheckersPlayer i_Opponent)
        {
            int  sumOfPlayerPoints    = this.GetPlayerPoints();
            int  sumOfOpponentPoints  = i_Opponent.GetPlayerPoints();
            bool isValidPointsForQuit = (sumOfPlayerPoints - sumOfOpponentPoints) <= 0;

            return(isValidPointsForQuit);
        }