public GameThread(Game game) { _game = game; }
private static GameState GenerateGameState(double height, double width, Game game) { return new GameState { Size = new Size { Height = height, Width = width }, Foes = new List<IFoe>(), Goals = new List<IGoal> { new Goal {Location = new Location(0,0)}, new Goal {Location = new Location(width - Goal.Width, 0)}, new Goal {Location = new Location(0, height - Goal.Height)}, new Goal {Location = new Location(width - Goal.Width, height - Goal.Height)}, new Goal {Location = new Location(50+0,50+0)}, new Goal {Location = new Location(-50+width - Goal.Width, 50+0)}, new Goal {Location = new Location(50+0, -50+height - Goal.Height)}, new Goal {Location = new Location(-50+width - Goal.Width, -50+height - Goal.Height)}, new Goal {Location = new Location(100+0,100+0)}, new Goal {Location = new Location(-100+width - Goal.Width, 100+0)}, new Goal {Location = new Location(100+0, -100+height - Goal.Height)}, new Goal {Location = new Location(-100+width - Goal.Width, -100+height - Goal.Height)}, }, GameTanks = game.Players.SelectMany(player => player.Tanks.Select(tank => (IGameTank)new GameTank(tank, player.Name))).ToList(), GravityEntities = new List<IGravityEntity>(), Wave = 0, Lost = false }; }