diff --git a/piskvorky.py b/piskvorky.py new file mode 100644 index 0000000..dacd410 --- /dev/null +++ b/piskvorky.py @@ -0,0 +1,23 @@ +board = [[" ", " ", " "],[" ", " ", " "],[" ", " ", " "]] + +def print_board(board): + print(f""" 1 2 3 +1 |{board[0][0]}|{board[0][1]}|{board[0][2]}| +2 |{board[1][0]}|{board[1][1]}|{board[1][2]}| +3 |{board[2][0]}|{board[2][1]}|{board[2][2]}| +""") + +def player(board): + player_move = input("Zvol si radu a sloupec ") + try: + if board[int(player_move[0])][int(player_move[0])] == " ": + pass + else: + print("Moznost nelze vybrat") + player_move = input("Zvol si radu a sloupec ") + except: + print("Moznost nelze vybrat") + player_move = input("Zvol si radu a sloupec ") + + +player()