View¶
- class WorldView(game: Game, model: WorldModel)[source]¶
Bases:
object
Render Terrain and game entities
- camera¶
Used to show portions of the game world
Do not modify the state of the game, entities, terrain, etc.
Only draw the state of the game, nothing else
The view should query the model or controller and make changes based on that info. The view should not collect input from the user.
- draw(surface: pygame.Surface)[source]¶
- get_team_center(team) Optional[pygame.math.Vector2] [source]¶
Get centre coordinates for the team
- view_to_point(point: pygame.math.Vector2)[source]¶
Return map pixel coords under the point
Point must be relative to the topleft corner of the view