public void StartNewGame() { Map.CreateEmptyMap(Consts.MAP_WIDTH, Consts.MAP_HEIGHT); Players = new List<Player>(2) {new Player(PlayerColor.Red, RaceName.Human, true), new Player(PlayerColor.Blue, RaceName.Human, true)}; _currentPlayer = Players[0]; }
public void Tick() { if (--_currentPlayer.TimeLeft == 0) { _currentPlayer = PassTurn(); return; } var decision = _currentPlayer.Strategy.MakeDecision(Map); if (decision != null && !IsShowingModal) Drawer.Instance().DecisionHandler(this, new DecisionArgs { Decision = decision }); }
public void LoadGame(GameState state) { Players = state.Players; //TODO: добавить в файл сохранения информацию о том, который из игроков ходит. _currentPlayer = Players[0]; Map.LoadFrom(state.Map); }