Code: Alles auswählen
F1 = 1 #Spielfeld F = Feld
F2 = 2
F3 = 3
F4 = 4
F5 = 5
F6 = 6
F7 = 7
F8 = 8
F9 = 9
XO = 1 #welcher spieler ist an der Reihe
stopvar = 1 #whileloop
playerinput = 0
def game ():
playerinput = input("Bitte gebe deine Wahl ein " + XO + ":" )
if playerinput == range(9):
while 1 == 1:
XO = input("Welcher spieler soll anfangen? X oder O:")
if XO == X or O:
while stopvar == 1:
game()
else:
print('Falsche Eingabe.')
continue
while 1 == 1:
^
IndentationError: expected an indented block"
aus. In meiner Logik habe ich alles richtig gemacht. Im Internet steht das ich Tab und Enter nicht mischen soll, und das habe ich auch nicht gemacht, obwohl ich noch nie Probleme damit hatte. Das ziel ist ein funktionierendes Tic Tac Toe spiel.
Danke im voraus! Gruß Jakob