def two_hits(): g = battleship.load_grid_from_file('grid1.grd') g.shoot((1,1)) g.shoot((1,2)) g.shoot((2,2)) b = battleship.BlindGrid(g) return b.__dict__
def only_miss(): g = battleship.load_grid_from_file('grid1.grd') g.shoot((1,1)) b = battleship.BlindGrid(g) return b.__dict__
def no_shot(): g = battleship.load_grid_from_file('grid1.grd') b = battleship.BlindGrid(g) return b.__dict__
def sink_ship(): g = battleship.load_grid_from_file('grid1.grd') g.shoot((2,2)) res = g.shoot((1,2)) return (res, g.__dict__)
def miss_ships(): g = battleship.load_grid_from_file('grid1.grd') res = g.shoot((1,1)) return (res, g.__dict__)
def load_helper(filename): return battleship.load_grid_from_file(filename).__dict__