Esempio n. 1
0
        // alinan root minionlardan sadece player'in science type'ina uygun olanlari true olacak. Diger minionlar unlocked bile olsalar, science type uygun degilse bu listede false olacaklar.
        //Upgrade edileni true yap, upgrade olani da false yap ki yapilabilecek minionlar listesinden parent olan cikmis olsun.
        public Player(User user, Game game)
        {
            readyInQueue = false;
            loadedTheGame = false;

            this.user = user;
            this.game = game;
            this.board = (Board)Activator.CreateInstance(TypeIdGenerator.getBoardType(user.selectedBoardTypeId));
            board.player = this;

            cash = 20000;
            income = 1200;
            healthPoints = 10; // 5000000;

            playerState = PlayerState.ALIVE;

            initializeAvailableMinions();
        }
Esempio n. 2
0
        private void destroyGame(User guiltyUser)
        {
            Science_Wars_Server.Game gameToBeDestroyed = guiltyUser.player.game;
            foreach (Player player in guiltyUser.player.game.players)
            {
                if (player.user == guiltyUser || player.user.Destroyable == true)
                {
                    player.user.setState(User.UserState.LOBBY);
                }

                else if (player.user != guiltyUser && player.user.Destroyable == false)
                {
                    Runner.queue.addUser(player.user);
                    LReturnQueue.sendMessage(player.user);
                }
            }

            gameToBeDestroyed.destroy();
        }
Esempio n. 3
0
 public void AddGame(Game game)
 {
     games.AddLast(game);
 }