Exemplo n.º 1
0
    void writeMarketForcesToFile()
    {
        string updatedMarketForces = "";

        //Compile the array back to a single string
        foreach (string gd in marketForces)
        {
            updatedMarketForces = updatedMarketForces + gd + ",";
        }

        //Chop off the last comma
        int index = updatedMarketForces.LastIndexOf(',');

        updatedMarketForces = updatedMarketForces.Substring(0, index);

        //Then update the data file
        dm.writeToMarketForcesFile(updatedMarketForces);

        //refresh the game data array
        getMarketForces();
    }