1234567891011121314151617181920 |
- import time
- import random
- from p4 import *
- def J1(m,p):
- return random.randint(0,len(m))
-
- def J2(m,p):
- return random.randint(0,len(m))
- A=P4(J1,J2,6,7)
- while A.get_match()[0]:
- if A.get_state()[0]=="PJ":
- print(A.get_state()[2]," a place : ",A.get_state()[1])
- A.update()
- print("Verdict: ",A.get_match()[1])
- x = '\n'.join([''.join(['{:4}'.format(item) for item in row]) for row in A.get_matrice()])
- print(x)
|