Exemplo n.º 1
0
 public void CurrentPlayer()
 {
     var game = new Game("Nicola", "Mario");
     game.Put(1, 1);
     Assert.Equal("Nicola", game.CurrentPlayerName);
     game.Put(0, 1);
     Assert.Equal("Mario", game.CurrentPlayerName);
 }
Exemplo n.º 2
0
 public void ThreePutsNoWins()
 {
     var game = new Game("Nicola", "Mario");
     game.Put(0, 0);
     game.Put(1, 0);
     game.Put(1, 1);
     Assert.Null(game.WinnerPlayerName);
 }
Exemplo n.º 3
0
 public void VerticalRow()
 {
     var game = new Game("Nicola", "Mario");
     game.Put(0, 0);
     game.Put(0, 2);
     game.Put(1, 0);
     game.Put(1, 2);
     game.Put(2, 0);
     Assert.Equal("Nicola", game.WinnerPlayerName);
 }
Exemplo n.º 4
0
 public void SecondDiagonalWins()
 {
     var game = new Game("Nicola", "Mario");
     game.Put(0, 2);
     game.Put(0, 1);
     game.Put(1, 1);
     game.Put(2, 2);
     game.Put(2, 0);
     Assert.Equal("Nicola", game.WinnerPlayerName);
 }