public IdleState(SimpleReactionController controller) { this._controller = controller; this._controller.gui.Init(); //Game Over or Start a game, set turn to 1 this._controller.TurnAvailable = 3; this._controller.CountTotalTurn = 3; }
public DisplayState(SimpleReactionController controller) { this._controller = controller; //At the last turn, display another messge if (this._controller.TurnAvailable <= 1) { this._controller.gui.SetDisplay($"Average ticks: {Convert.ToString(this._controller.CountTotalTick / this._controller.CountTotalTurn)}"); } else { this._controller.CountTotalTick += this._controller.CountTick; this._controller.gui.SetDisplay($"{Convert.ToString(this._controller.CountTick)} ticks has passed"); } }
public ReadyState(SimpleReactionController controller) { this._controller = controller; this._controller.gui.SetDisplay("Press go/stop"); }
public IdleState(SimpleReactionController controller) { this._controller = controller; this._controller.gui.Init(); }
public DisplayState(SimpleReactionController controller) { this._controller = controller; this._controller.gui.SetDisplay($"{Convert.ToString(this._controller.count)} ticks has passed"); }
public WaitState(SimpleReactionController controller) { this._controller = controller; this._controller.gui.SetDisplay("Wait a bit"); this._controller.count = this._controller.random.GetRandom(150, 200); }