NotQuiteParadise2

nqp.world package

Subpackages

Submodules

nqp.world.model module

nqp.world.view module

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.

__init__(game: Game, model: WorldModel)[source]
draw(surface: pygame.Surface)[source]
get_team_center(team) Optional[pygame.math.Vector2][source]

Get centre coordinates for the team

reset_camera()[source]
update(delta_time: float)[source]
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

Module contents