summaryrefslogtreecommitdiff
path: root/tui
diff options
context:
space:
mode:
authorAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-01-17 13:16:56 +0200
committerAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-01-17 13:16:56 +0200
commit9acab08eeede3a3c065057d4466ccaef2035b55d (patch)
tree9145cf28a8dfe2e4dc5eb0aea587bdd35c7ac1ca /tui
parent823877510422f6ce2952de5cc40edd0d62d813e4 (diff)
Making board compatible with non square playing areas like expert 30x16.
Diffstat (limited to 'tui')
-rw-r--r--tui/tui.py6
1 files changed, 3 insertions, 3 deletions
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):