示例#1
0
 /// <summary>
 /// This function will be used when playing with 3 players
 /// </summary>
 /// <param name="player1Name">The name of the first player</param>
 /// <param name="player2Name">The name of the second player</param>
 /// <param name="player3Name">The name of the third player</param>
 public void Play3Players(string player1Name, string player2Name, string player3Name)
 {
     scoreboards[1]             = new ScoreBoard.Scoreboard();
     scoreboards[1].PlayersName = player1Name;
     scoreboards[2]             = new ScoreBoard.Scoreboard();
     scoreboards[2].PlayersName = player2Name;
     scoreboards[3]             = new ScoreBoard.Scoreboard();
     scoreboards[3].PlayersName = player3Name;
 }
示例#2
0
        public void TestPositiveNegativeScenario()
        {
            ScoreBoard.Scoreboard board = new ScoreBoard.Scoreboard();
            board.PlayersName = "Hans";
            board.Requested   = 1;
            board.Received    = 1;
            int result = board.Score;

            Assert.AreEqual(30, result);
            board.Requested = 1;
            board.Received  = 0;
            result          = board.Score;
            Assert.AreEqual(20, result);
        }
示例#3
0
 /// <summary>
 /// This function will be used when playing with 6 players
 /// </summary>
 /// <param name="player1Name">The name of the first player</param>
 /// <param name="player2Name">The name of the second player</param>
 /// <param name="player3Name">The name of the third player</param>
 /// <param name="player4Name">The name of the fourth player</param>
 /// <param name="player5Name">The name of the fifth player</param>
 /// <param name="player6Name">The name of the sixth player</param>
 public void Play6Players(string player1Name, string player2Name, string player3Name, string player4Name, string player5Name, string player6Name)
 {
     Play5Players(player1Name, player2Name, player3Name, player4Name, player5Name);
     scoreboards[6]             = new ScoreBoard.Scoreboard();
     scoreboards[6].PlayersName = player6Name;
 }
示例#4
0
 /// <summary>
 /// This function will be used when playing with 4 players
 /// </summary>
 /// <param name="player1Name">The name of the first player</param>
 /// <param name="player2Name">The name of the second player</param>
 /// <param name="player3Name">The name of the third player</param>
 /// <param name="player4Name"></param>
 public void Play4Players(string player1Name, string player2Name, string player3Name, string player4Name)
 {
     Play3Players(player1Name, player2Name, player3Name);
     scoreboards[4]             = new ScoreBoard.Scoreboard();
     scoreboards[4].PlayersName = player4Name;
 }