From 86d15d6b9af3b6d2ca757396b5d2676f2c0278ab Mon Sep 17 00:00:00 2001 From: AlberLC Date: Wed, 16 Nov 2022 06:12:04 +0100 Subject: [PATCH] Improve connect 4 frontend --- flanabot/connect_4_frontend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flanabot/connect_4_frontend.py b/flanabot/connect_4_frontend.py index 92ae3a3..305a8d6 100644 --- a/flanabot/connect_4_frontend.py +++ b/flanabot/connect_4_frontend.py @@ -232,7 +232,7 @@ def write_player_turn(name: str, color: tuple[float, float, float], context: cai draw_text(text, point, GRAY, FONT_SIZE, True, context) point = (point[0] + context.text_extents(text).width + 9 * SIZE_MULTIPLIER, point[1]) draw_text(name, point, color, FONT_SIZE, True, context) - point = (point[0] + context.text_extents(name).width, point[1]) + point = (point[0] + context.text_extents(name).width + 2 * SIZE_MULTIPLIER, point[1]) draw_text('.', point, GRAY, FONT_SIZE, True, context) @@ -246,5 +246,5 @@ def write_winner(name: str, color: tuple[float, float, float], context: cairo.Co draw_text(text, TEXT_POSITION, GRAY, FONT_SIZE, True, context) point = (point[0] + context.text_extents(text).width + 6 * SIZE_MULTIPLIER, point[1]) draw_text(name, point, color, FONT_SIZE, True, context) - point = (point[0] + context.text_extents(name).width, point[1]) + point = (point[0] + context.text_extents(name).width + 2 * SIZE_MULTIPLIER, point[1]) draw_text('!!!', point, GRAY, FONT_SIZE, True, context)