mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-18 07:45:53 -08:00
Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
This commit is contained in:
42
38_Fur_Trader/csharp/GameState.cs
Normal file
42
38_Fur_Trader/csharp/GameState.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FurTrader
|
||||
{
|
||||
internal class GameState
|
||||
{
|
||||
internal bool GameOver { get; set; }
|
||||
|
||||
internal double Savings { get; set; }
|
||||
|
||||
internal int ExpeditionCount { get; set; }
|
||||
|
||||
internal int UnasignedFurCount { get; set; }
|
||||
|
||||
internal int[] Pelts { get; private set; }
|
||||
|
||||
internal int MinkPelts { get { return this.Pelts[0]; } set { this.Pelts[0] = value; } }
|
||||
internal int BeaverPelts { get { return this.Pelts[1]; } set { this.Pelts[1] = value; } }
|
||||
internal int ErminePelts { get { return this.Pelts[2]; } set { this.Pelts[2] = value; } }
|
||||
internal int FoxPelts { get { return this.Pelts[3]; } set { this.Pelts[3] = value; } }
|
||||
|
||||
internal int SelectedFort { get; set; }
|
||||
|
||||
internal GameState()
|
||||
{
|
||||
this.Savings = 600;
|
||||
this.ExpeditionCount = 0;
|
||||
this.UnasignedFurCount = 190;
|
||||
this.Pelts = new int[4];
|
||||
this.SelectedFort = 0;
|
||||
}
|
||||
|
||||
internal void StartTurn()
|
||||
{
|
||||
this.SelectedFort = 0; // reset to a default value
|
||||
this.UnasignedFurCount = 190; // each turn starts with 190 furs
|
||||
this.Pelts = new int[4]; // reset pelts on each turn
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user