Ejemplo n.º 1
0
        public GameState(Coordinates screenResolution)
        {
            _gameMap = new GameMap();
            var palinurusPosition = new Coordinates(0, GetStartingPalinurusTopOffset(screenResolution.Top));

            Palinurus = new Palinurus(palinurusPosition, screenResolution);
            var wallOnecoordinates = new Coordinates(10, 20);
            var wallOne            = new Wall(wallOnecoordinates);

            _gameMap.CurrentMap[wallOnecoordinates] = wallOne;
        }
Ejemplo n.º 2
0
 private void DrawWorld(Palinurus palinurus, GameState gameState)
 {
     Console.Clear();
     gameState.Draw();
     Console.CursorLeft = palinurus.LeftOffset;
     Console.CursorTop  = palinurus.TopOffset;
     foreach (var line in palinurus.CharacterRepresentation)
     {
         Console.Write($"{line}\n");
         Console.CursorLeft = palinurus.LeftOffset;
     }
 }