Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

State Provider

Alexandru Dan edited this page Aug 30, 2017 · 8 revisions

Encapsulates the entire game state, including avatars, their code, and the world.

Used by: Turn Manager Found in file: game_state.py

Interface:

  • get_state_for:
    • return a personalized view of the world for a specific avatar
    • it applies a fog_of_war to return that specific view
  • add_avatar: add a new avatar associated with a worker to the game
  • remove avatar: remove a specific avatar
  • update_environment:
    • update the effects attached to the avatars
    • update the world map(i.e. score, pickups, score locations, etc.)
  • is_complete:
    • check a completion via a callback registered at initialization
    • this is how the Turn Manager knows to "end" a game

Note: do not confuse with Game State

Clone this wiki locally