public void StartGame() { view.DisplayStartMenu(); CreateStates(); var gameState = gameController.GetGameState(); view.DisplayField(mapper.Map(gameState.GameField)); DisplayPlayerInfo(); view.DisplayGameMenu(); }
private void GetCargoInfo() { var cargo = gameController.GetCurrentCellCargo(); var gameState = gameController.GetGameState(); view.DisplayField(mapper.Map(gameState.GameField)); DisplayPlayerInfo(); if (cargo == null) { view.DisplayNoCargoInfo(); } else { view.DisplayCargoInfo(cargo.IsDecoding, cargo.Price, cargo.Weight); } view.DisplayGameMenu(); }
public int[,] GetField() { var gameState = _controller.GetGameState(); if (gameState is null) { return(new int[0, 0]); } var fieldModel = _fieldMapper.Map(_controller.GetGameState().GameField); return(fieldModel.Field); }