Skip to content

Instantly share code, notes, and snippets.

@bussiere
Created February 24, 2011 22:25
Show Gist options
  • Save bussiere/843030 to your computer and use it in GitHub Desktop.
Save bussiere/843030 to your computer and use it in GitHub Desktop.
djam en python
import random
dice1 = ["L","U","R","R","I","I"]
dice2 = ["S","L","D","M","A","A"]
dice3 = ["S","N","B","N","E","E"]
dice4 = ["O","O","C","H","T","T"]
dice5 = ["V","J","P","F","P","G"]
dices = [dice1,dice2,dice3,dice4,dice5]
theme = ["hentai","heroine","dessins animés","fetchisme","shoujo"]
i = 0
lettres = []
taille = len(dices)
while i < taille :
j = random.randint(0,len(dices)-1)
print j
i= i+1
k = random.randint(0,len(dices[j])-1)
lettres.append(dices[j][k])
del(dices[j])
print "theme :"
print theme[random.randint(0,len(theme)-1)]
print "Lettre a placer : "
print lettres
print "lettre a placer eventuellement en premier"
print lettres[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment