Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def MRV_Moves(game_board):
- l=[]#stores xy with remaing vals
- for row in game_board.BoardSize:#goes thru all posibilities
- for column in game_board.BoardSize:
- if (game_board[row][column]==0):
- l=[[0,row,column]]+l#load tuple
- for x in range(1,game_board.BoardSize):
- game_board.set_value(row,column,x)
- if(game_board.check_legal()):#if move is legal add 1 to remaing vals
- l[0][0]+=1
- sorted(l)
- g=[]
- g.append(l[0][1])
- g.append(l[0][2])
- return g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement