// 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(); }
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(); }
public void AddGame(Game game) { games.AddLast(game); }