Expand|Select|Wrap|Line Numbers
- def ente(number, a, use):
- global remaining
- global uklad
- remaining=pozo(uklad)
- # while(pozostale!=[]):
- if(pozostale!=[]):
- use=1-use
- uklad=computer_play(uklad,ramining, use)
- # sleep(0.5)
- whi=0
- bla=0
- for i in range(64):
- if(uklad[i]==1):
- a[i]["background"]="white"
- whi+=1
- elif(uklad[i]==2):
- a[i]["background"]="black"
- bla+=1
- remaining=pozo(uklad)
- ente(number, a, use)
- else:
- print "end of game"
where remaining is a list of possible plays, uklad is a list holding state of game, use - number of a player(0,1), computer_plays is a function, that evaluates the "best" of move adding it to state of game, and returns if, and finally the 'a' is a list of frames,
Hope you understood my problem:)
I'm a dumbass:) I've solved problem by looking to a book stored on my disk:) anyway thank everryone who looked at my post