-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
50 lines (35 loc) · 1.05 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
'''
=============================================================
File: main.py
Developer: Ruimteman
Date: 05/08/2023
Description:
Tic-Tac-Toe game
==============================================================
'''
from src.funksies import bord
from src.funksies import speel
from src.funksies import toets_vir_wen
while True:
lys = "123456789"
bord(lys)
counter = 0
while True:
#speler X se beurt
speler = "X"
lys = speel(lys, speler)
if toets_vir_wen(lys, speler) == 1 : break
counter += 1
if counter == 9:
print("Dit is gelykop!")
break
#speler O se beurt
speler = "O"
lys = speel(lys, speler)
if toets_vir_wen(lys, speler) == 1 : break
counter += 1
if counter == 9:
print("Dit is gelykop!")
break
speel_verder = input("Wil jy nog speel?(J/N)").lower()
if speel_verder == "n": exit()