This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
def print_grid(grid): | |
print ("\n%s\n" % "+".join([('-' * 4)] * 4)).join( | |
["|".join(["%4d" % item if item > 0 else " " * 4 for item in line]) for line in grid]) | |
def get_available_cells(grid): |