diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-12 09:15:33 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-12 09:15:33 +0100 |
commit | e4dc4beedb9c9032989134842fd2a88e8f70e666 (patch) | |
tree | 64a8d2ebbedf6350263e31b9e4ce382fc7fbafeb | |
parent | 3fbbe86c5007ac82069feb342a462202d6a1a2b5 (diff) |
mirror output vertically
-rw-r--r-- | console/main.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/console/main.py b/console/main.py index f9b7e39..5953d4a 100644 --- a/console/main.py +++ b/console/main.py @@ -13,7 +13,7 @@ class bord: self.board = [[EMPTY for x in range(self.width)] for u in range(self.height)] def print(self): - print("\n".join([" ".join(y) for y in self.board])) + print("\n".join([" ".join(self.board[y]) for y in range(len(self.board) -1, -1, -1)])) def outside_board(self, coords): return coords[0] < 0 or \ @@ -32,6 +32,13 @@ class bord: def main(): disc_a = True gert = bord(7, 6) + gert.board[0][0] = "x" + gert.board[1][0] = DISC_A + gert.board[2][0] = DISC_A + gert.board[3][0] = DISC_A + gert.board[0][1] = DISC_B + gert.board[0][2] = DISC_B + gert.board[0][3] = DISC_B while True: gert.print() column = int(input("column?: ")) - 1 |