Exemplo n.º 1
0
 public void TestCheckWinnerMethod()
 {
     World w = new World(3, 0, null);
     Player player1 = new Player("Meeeeee!", Color.HotPink, w);
     Player player2 = new Player("Meeeeee!2", Color.Red, w);
     w.addPlayer(player1);
     w.addPlayer(player2);
     Assert.IsFalse(w.checkWinner());
     player2.incrementPoints(20);
     Assert.IsTrue(w.checkWinner());
 }
Exemplo n.º 2
0
 public void TestIncrementPoints()
 {
     var target = new Player();
     target.incrementPoints(1);
     Assert.AreEqual(1, target.getPoints());
 }
Exemplo n.º 3
0
 public void TestHasWonGame()
 {
     var target = new Player();
     target.incrementPoints(9);
     Assert.IsFalse(target.hasWonGame());
     target.incrementPoints(1);
     Assert.IsTrue(target.hasWonGame());
 }