Skip to content

Commit

Permalink
show player name
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Nov 10, 2021
1 parent ed59ccf commit 63dba33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ async def main_loop(queue):
state = await queue.get() # first state message includes map information
logging.debug("Initial game status: %s", state)
newgame_json = json.loads(state)
player_name = ""

win.fill((0, 0, 0))

Expand Down Expand Up @@ -171,6 +172,12 @@ def draw_blocks(coordinates, color, x_offset=0, y_offset=0):
)
yy += 6

draw_info(
win,
f"{player_name}",
scale((dimensions.x + 1, dimensions.y-1)),
COLORS["white"],
)
draw_info(
win,
f"SCORE: {score}",
Expand Down

0 comments on commit 63dba33

Please sign in to comment.