This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
World Map
Alexandru Dan edited this page Aug 30, 2017
·
9 revisions
The World Map is the central component of the simulation. The class itself consists of a grid and a set of JSON settings. The grid consists of a dictionary of type <Location, Cell>.
A cell has the following components:
- location - (x, y) pairs that can be added together, serialized, compared, etc.
- avatars - see Game Objects for more details
- pickup - see Game Objects for more details
- cell content - the cell content can either be a score cell, an obstacle or a plain floor cell
- fog of war
- actions - an array where the intended actions of different avatars are registered and, afterwards, applied
World Map has a lot of misc functionality, as multiple other objects communicate with it and need a simple API.
Cell specific functionality:
- get_cell
- all_cells
- score_cells
- pickup_cells
Map dimension functionality:
- is_on_map
- max_x
- max_y
- min_x
- min_y
- num_cols
- num_rows
- num_cells