示例#1
0
        public void CreatingPlayerIsPlayerOne()
        {
            Player player1 = new Player();
            var game = new Game(player1);

            Assert.AreEqual(player1, game.PlayerOne);
        }
示例#2
0
 public void GameContainsAvailableShip(string shipName)
 {
     var game = new Game(new Player());
     Assert.That(game.AvailableShips.Any(s=> s.Name == shipName));
 }
示例#3
0
        public void GenerateGameId()
        {
            var game = new Game(new Player());

            Assert.IsNotNull(game.GameId);
        }
示例#4
0
 public void CreateGame(Guid userId)
 {
     _game = new Game(new Player() { IsPlayerTurn = true, Name = "Player 1", PlayerId = userId });
     Clients.Caller.CreateGameResponse(_game.GameId);
 }