For reasons which will become clear in future tasks, we're not going to display the game map directly. Instead we're going to copy it to another grid, and display that grid.
Write a method that takes a Level and a Grid called display. A Level contains a map of type Grid, and a children list of entities -- which right now will only have one thing on it, a Player entity. A Player entity has x and y coordinates.
- Copy the map grid to the display grid. For now, assume they are the same size. We'll look at what to do when the display is smaller than the map in a later task.
- For each child of the level, draw a symbol representing the entity into the display. For players, the symbol is traditionally
@ in rogue-like games.
- Then render the
display grid.
For reasons which will become clear in future tasks, we're not going to display the game map directly. Instead we're going to copy it to another grid, and display that grid.
Write a method that takes a
Leveland aGridcalleddisplay. ALevelcontains amapof typeGrid, and achildrenlist of entities -- which right now will only have one thing on it, aPlayerentity. APlayerentity hasxandycoordinates.@in rogue-like games.displaygrid.