Example #1
0
        /// <Summary>
        /// Generate a new turn, if able, and update the Nova Console UI
        /// </Summary>
        private void GenerateTurn()
        {
            /* FIXME (priority 5) This gives a flase negative indication, i.e. GameInProgress is false even when a game is in progress.
             * if (ServerState.Data.GameInProgress == false)
             * {
             *  Report.Error("There is no game in progress. Open a current game or create a new game.");
             *  return;
             * }
             */

            if (!File.Exists(serverState.StatePathName))
            {
                Report.Error("There is no game open. Open a current game or create a new game.");
                return;
            }
            TurnGenerator turn = new TurnGenerator(serverState);

            turn.Generate();

            newGameMenuItem.Enabled      = false;
            generateTurnMenuItem.Enabled = false;

            AddStatusMessage("New turn generated for year " + serverState.TurnYear);
            turnYearLabel.Text = serverState.TurnYear.ToString();

            serverState.Save();

            SetPlayerList();
        }
Example #2
0
    public void processTurn()
    {
        Settings.instance.SetNoSelected();
        TurnGenerator tg = new TurnGenerator(game.getGame(), fc, pc);

        // do turn processing
        tg.generate();
    }
Example #3
0
        private void GenerateIntel()
        {
            TurnGenerator firstTurn = new TurnGenerator(serverState);

            firstTurn.AssembleEmpireData();

            Scores      scores      = new Scores(serverState);
            IntelWriter intelWriter = new IntelWriter(serverState, scores);

            intelWriter.WriteIntel();
        }
Example #4
0
    public void processTurn()
    {
        blockerPanel.SetActive(true);
        TurnGenerator tg = new TurnGenerator(game.getGame(), fc, pc);

        // do turn processing
        tg.generate();
        //write the game files
        writeGameToJson();
        //save the game files to a zip
        saveGameToZip();
        //upload the game files
        uploadGameFiles();
        //takes the turn, passing a reference to the uploaded game file
        //takeTurn();
    }