fix: value exceptions
This commit is contained in:
+14
-2
@@ -1,7 +1,7 @@
|
||||
# TODO -
|
||||
|
||||
# add:
|
||||
# fix:
|
||||
# fix: general bugfixes
|
||||
# update:
|
||||
|
||||
# algorithm steps
|
||||
@@ -61,10 +61,11 @@ def init():
|
||||
clearScreen()
|
||||
print("Size of the playfield (n*n):", size)
|
||||
F_printOneMoreTime = 0
|
||||
if size <= 2:
|
||||
if size < 3:
|
||||
clearScreen()
|
||||
print("Size of the playfield (n*n):", size, "(changed to 3*3)")
|
||||
size = 3
|
||||
_size = size
|
||||
|
||||
|
||||
# 03 -> allow a user to enter names of two players
|
||||
@@ -84,8 +85,19 @@ def init():
|
||||
continue
|
||||
if F_printOneMoreTime == 1:
|
||||
clearScreen()
|
||||
print("Size of the playfield (n*n):", size, "(changed to 3*3)")
|
||||
print("Name of the first player:", name1)
|
||||
print("Name of the second player:", name2)
|
||||
print("Number of symbols inline needed to win:", symbolCount)
|
||||
F_printOneMoreTime = 0
|
||||
if symbolCount > _size >= 0:
|
||||
clearScreen()
|
||||
print("Size of the playfield (n*n):", _size)
|
||||
print("Name of the first player:", name1)
|
||||
print("Name of the second player:", name2)
|
||||
print("Number of symbols inline needed to win:", symbolCount, f"(changed to {_size}*{_size})")
|
||||
symbolCount = _size
|
||||
time.sleep(2)
|
||||
|
||||
# creating the playfield
|
||||
pf = [] # pf is shor for PlayField
|
||||
|
||||
Reference in New Issue
Block a user