Well don't need help with the entire game. I'm a c# programmer, but I have to make thin game in python.
The game in simple. The computer choose 5 different color from 8 colors and in a specifid order.
Then the player have to guess the 5 colors in the right order.
here is the code:
Code
import random
TCool = ['NOI', 'BLA', 'JAU', 'ORA', 'ROU', 'VER', 'BRU', 'BLE']
TSol = []
Ttry = []
rand = 0
while i < 5:
rand = random.randint(0,7)
Tsol[i] = TCool[rand]
i = i +1
test = raw_input("Enter your five color in that format: co1,co2,co3,co4,co5")
I would like to know how to trim string
test to make sure each color have the same format than TCool and of course 5 colors have to be entered and will be in Ttry array to compare with Tsol
This post was edited by eric838 on Apr 22 2014 08:26pm