Co-authored-by: staubsauger <staubsauger@users.noreply.github.com>
This commit is contained in:
parent
fe5d2bb24e
commit
a4981d1575
3 changed files with 16 additions and 8 deletions
|
|
@ -7,6 +7,7 @@ from random import Random
|
|||
import g
|
||||
|
||||
from tcod.ecs import Registry, Entity
|
||||
from tcod.map import Map
|
||||
|
||||
from game.components import Gold, Graphic, Position
|
||||
from game.tags import IsActor, IsItem, IsPlayer, IsWall, IsDoor
|
||||
|
|
@ -15,6 +16,7 @@ from game.tags import IsActor, IsItem, IsPlayer, IsWall, IsDoor
|
|||
def new_world() -> Registry:
|
||||
"""Return a freshly generated world."""
|
||||
world = Registry()
|
||||
g.world_map = Map(100, 100)
|
||||
rng = world[None].components[Random] = Random()
|
||||
|
||||
player = world[object()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue