Пример #1
0
 public void Add(StarSystem starSystem)
 {
     starSystem.Game = this;
     StarSystems.Add(starSystem);
 }
Пример #2
0
        public void Start()
        {
            // make sure not already created
            //if (Started)
            //    throw new Exception("Game already started.");

            //if (Players.Count < 2)
            //    throw new Exception("Must have 2 players to start.");

            Started = true;

            // update game status
            StartTime = DateTime.UtcNow;

            // send player messages
            //SendForumMessage("Game #" + GameName + " Started");

            DefaultShips.Clear();
            StarSystems.Clear();

            var starSystem = new StarSystem();
            Add(starSystem);

            GameServer.SaveGame(this);

            //        using (var db = CreateDB())
            //        {
            //            db.Execute("delete from player where game_id = {0} and isInvite = 1", game.Id);
            //        }
            //        EmailAllPlayers(game, game.GameName + " Started", "The Global Combat game (" + game.GameName + ") has started.\n\nVisit http://globalcombat.com/Game-" + game.Id + " to play your turn.", true);
            //        GameHub.Refresh("Game-" + game.Id);
        }
Пример #3
0
 public MissionDefeatEnemy(StarSystem initStarSys, string initMissionText)
     : base(MissionType.MISSION_TYPE_DEFEAT_ENEMY, initMissionText)
 {
     starSystem = initStarSys;
 }