master
aglaia 2 years ago
commit 14c0fdfb7e

@ -2,25 +2,25 @@
#First it sets variables #First it sets variables
import random import random
#games = ["backgammon", "pokemon", "war"] #games = ["backgammon", "pokemon", "war"]
#Pull the content from games.txt #Pull the content from games.txt
#Open games.txt file #Open games.txt file
#Read the game name list from the games.txt file #Read the game name list from the games.txt file
#Make a game name list #Make a game name list
gamenames = open("text/games.txt").read().split("\n") gamenames = open("text/games.txt").read().split("\n")
#print(type(gamenames)) #print(type(gamenames))
#print(gamenames) #print(gamenames)
#Read the verbs list from the verbs.txt file #Read the verbs list from the verbs.txt file
#Make a verbs list #Make a verbs list
verbs = open("text/verbs.txt").read().split("\n") verbs = open("text/verbs.txt").read().split("\n")
#print(type(verbs)) #print(type(verbs))
#print(verbs) #print(verbs)
#Read the objects list from the objects.txt file #Read the objects list from the objects.txt file
#Make a objects list #Make a objects list
objects = open("text/object.txt").read().split("\n") objects = open("text/object.txt").read().split("\n")
def spaceremover (defspace): def spaceremover (defspace):
for object in defspace: for object in defspace:
if object == "": if object == "":
defspace.remove("") defspace.remove("")
return defspace return defspace
@ -28,7 +28,7 @@ def spaceremover (defspace):
objects = spaceremover(objects) objects = spaceremover(objects)
verbs = spaceremover(verbs) verbs = spaceremover(verbs)
gamenames = spaceremover(gamenames) gamenames = spaceremover(gamenames)
#new funtion quantifier #new funtion quantifier
def quantifier (words): def quantifier (words):
amount = random.randint(-5,7) amount = random.randint(-5,7)
word = random.choice(words) word = random.choice(words)
@ -37,7 +37,7 @@ def quantifier (words):
return word return word
if word[-1] =="y": if word[-1] =="y":
word = word[0:-1] word = word[0:-1]
#word = word.replace("y","") #word = word.replace("y","")
return word + "ies" return word + "ies"
return word + "s" return word + "s"
#print(type(objects)) #print(type(objects))
@ -53,3 +53,12 @@ print("~*"*30)
for i in range(6): for i in range(6):
print(" " *10+"Rule " + str(i+1) + ": "+ random.choice(verbs) + " " + quantifier (objects)) print(" " *10+"Rule " + str(i+1) + ": "+ random.choice(verbs) + " " + quantifier (objects))
print("""
wWWWw wWWWw
vVVVv (___) wWWWw (___) vVVVv
(___) ~Y~ (___) vVVVv ~Y~ (___)
~Y~ \| ~Y~ (___) |/ ~Y~
\| \ |/ \| / \~Y~/ \| \ |/
\\|// \\|// \\|/// \\|// \\|// \\\|///
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
""")

@ -1,20 +1,7 @@
pokemon XML
war Leeszaal
backgammon Social Practice Library
counter strike Research Station
tennis Rotterdam Centraal Library
game of war Anarchist Book Library
activity Free street library
media design study
experimental publishing
climbing
football
soccer
library
badminton
wrestling
baseball
pong
table tennis
pinball
frizbee

Loading…
Cancel
Save