Siretu
Starcraft 2 Editor Moderator
- Reaction score
- 293
Well, it's a simple little game. Kinda pointless since:
You cannot win
PHP:
from time import sleep
print
print 'Welcome to the 21th game'
print 'The point of this game is to choose a number of marbles out of the 21 provided, you can take any number of marbles between 1 and 3.'
print 'The one that takes the last marble loose.'
print 'You will play against a computer.'
print 'You start'
marbles = 21
loop = 0
while loop != 1:
print
print 'How many marbles do you choose?'
print '1. One'
print '2. Two'
print '3. Three'
choice = input(">>>")
print
if choice < 4 and choice > 0:
marbles = marbles - choice
print 'You choose to take ', choice, " marbles, there's now ", marbles, 'marbles'
if marbles > 0:
compchoice = 4 - choice
print
sleep(1)
marbles = marbles - compchoice
print 'The computer takes away ', compchoice, "marbles. there's now", marbles, "marbles"
sleep(1)
else:
print "There's now no marbles left"
print "You lose"
loop = 1
else:
print 'You cant pick more than 3 marbles'