From 9acab08eeede3a3c065057d4466ccaef2035b55d Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Wed, 17 Jan 2024 13:16:56 +0200 Subject: Making board compatible with non square playing areas like expert 30x16. --- tui/tui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tui/tui.py') diff --git a/tui/tui.py b/tui/tui.py index 8521227..65e482d 100644 --- a/tui/tui.py +++ b/tui/tui.py @@ -110,11 +110,11 @@ class Tui(): self.read_action() - def game_begin(self, size): + def game_begin(self, width, height): """ ruudun alustus ja lähtökoordinaatien määritys """ - print(end="\n"*(size+1)) + print(end="\n"*(height+1)) Ansi.cup(1) - return size//2, size//2 + return width//2, height//2 def game_over(self, matrix, x, y): -- cgit v1.2.3