Skip to content

Copy the map grid to a display grid #14

Description

@ericlippert

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions