pythonified
This commit is contained in:
parent
0ea61c91b5
commit
fe5d2bb24e
1 changed files with 2 additions and 2 deletions
|
|
@ -52,8 +52,8 @@ class InGame(State):
|
||||||
def on_draw(self, console: tcod.console.Console) -> None:
|
def on_draw(self, console: tcod.console.Console) -> None:
|
||||||
"""Draw the standard screen."""
|
"""Draw the standard screen."""
|
||||||
centers = g.world.Q.all_of(tags=[IsPlayer])
|
centers = g.world.Q.all_of(tags=[IsPlayer])
|
||||||
centers = list(map(lambda a: a.components[Position], centers))
|
centers = [a.components[Position] for a in centers]
|
||||||
center = reduce(lambda a,b: a.components[Position]+b.components[Position], centers)
|
center = sum(centers, start=Position(0,0))
|
||||||
center = center.mod(len(centers))
|
center = center.mod(len(centers))
|
||||||
|
|
||||||
def draw(e):
|
def draw(e):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue