Format
There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
#FRANKENGEWINNSPIEL
|
||||
#-------------------------------------------------
|
||||
# FRANKENGEWINNSPIEL
|
||||
# -------------------------------------------------
|
||||
|
||||
|
||||
#Import of Modules and setup variables
|
||||
#import turtle
|
||||
# Import of Modules and setup variables
|
||||
# import turtle
|
||||
|
||||
#Definition of Turtle instances
|
||||
# Definition of Turtle instances
|
||||
|
||||
|
||||
|
||||
#Preparations, so setup of the game output window and choice of diffrent gamemodes
|
||||
# Preparations, so setup of the game output window and choice of diffrent gamemodes
|
||||
programchoice = 200
|
||||
while (programchoice < 1) or (programchoice > 99):
|
||||
programchoice = programchoice = int(input("Welcher Modus? 1 = Normales Spiel, 2 = Liste aller Gewinne mit angabe des Höchsten, 3 = angabe des höchsten Gewinnes, 4 = andgabe des höchsten erreichbaren Feldes: "))
|
||||
programchoice = programchoice = int(
|
||||
input(
|
||||
"Welcher Modus? 1 = Normales Spiel, 2 = Liste aller Gewinne mit angabe des Höchsten, 3 = angabe des höchsten Gewinnes, 4 = andgabe des höchsten erreichbaren Feldes: "
|
||||
)
|
||||
)
|
||||
if (programchoice < 1) or (programchoice > 99):
|
||||
print("Number not within designated range. Try again")
|
||||
print("Willkommen")
|
||||
|
||||
|
||||
|
||||
#MAINGAME
|
||||
#-----------------------
|
||||
# MAINGAME
|
||||
# -----------------------
|
||||
def playgame(field):
|
||||
global winning
|
||||
winning = 0
|
||||
@@ -32,10 +34,11 @@ def playgame(field):
|
||||
else:
|
||||
next = field / 2
|
||||
winning += next
|
||||
field = next
|
||||
|
||||
#GAMEMODE 1
|
||||
#-------------------------
|
||||
field = next
|
||||
|
||||
|
||||
# GAMEMODE 1
|
||||
# -------------------------
|
||||
def gamemode1():
|
||||
s = 200
|
||||
while (s < 1) or (s > 99):
|
||||
@@ -49,17 +52,18 @@ def gamemode1():
|
||||
print("Your winnings:", winning)
|
||||
|
||||
|
||||
#GAMEMODE 2
|
||||
#--------------------------
|
||||
# GAMEMODE 2
|
||||
# --------------------------
|
||||
def gamemode2():
|
||||
fieldascending = 1
|
||||
for i in range(99):
|
||||
playgame(fieldascending)
|
||||
print("You win",winning,"with startpoint",fieldascending)
|
||||
print("You win", winning, "with startpoint", fieldascending)
|
||||
fieldascending += 1
|
||||
|
||||
#GAMEMODE 3
|
||||
#--------------------------
|
||||
|
||||
|
||||
# GAMEMODE 3
|
||||
# --------------------------
|
||||
def gamemode3():
|
||||
fieldascending = 1
|
||||
global winning
|
||||
@@ -71,10 +75,11 @@ def gamemode3():
|
||||
currentwinning = winning
|
||||
currentfield = fieldascending
|
||||
fieldascending += 1
|
||||
print("Biggest possible winning is", currentwinning,"on field", currentfield)
|
||||
|
||||
#GAMEMODE 4
|
||||
#-----------------------------
|
||||
print("Biggest possible winning is", currentwinning, "on field", currentfield)
|
||||
|
||||
|
||||
# GAMEMODE 4
|
||||
# -----------------------------
|
||||
def gamemode4():
|
||||
fieldascending = 1
|
||||
global winning
|
||||
@@ -94,18 +99,19 @@ def gamemode4():
|
||||
next = field / 2
|
||||
field = next
|
||||
fieldascending += 1
|
||||
print("Biggest possible field is", biggestfield,"on startfield", currentfield)
|
||||
print("Biggest possible field is", biggestfield, "on startfield", currentfield)
|
||||
|
||||
#RUN
|
||||
#-------------------------
|
||||
|
||||
# RUN
|
||||
# -------------------------
|
||||
if programchoice == 1:
|
||||
gamemode1()
|
||||
|
||||
|
||||
elif programchoice == 2:
|
||||
gamemode2()
|
||||
|
||||
|
||||
elif programchoice == 3:
|
||||
gamemode3()
|
||||
|
||||
|
||||
else:
|
||||
gamemode4()
|
||||
|
||||
Reference in New Issue
Block a user