from Bot import *
from random import randint
class Bot2109992(Bot):
def __init__(self, settings):
super().__init__(settings)
self.possibleMoves = [UP, DOWN, RIGHT, LEFT]
self.setName('Mickey')
def nextMove(self, currentCell, currentEnergy, vision, remainingStainCells):
#move towards stain cells
stain_moves = [move for move in self.possibleMoves if currentCell.move(move) in remainingStainCells]
if stain_moves:
return stain_moves[0]
#if currentEnergy < 50:
#energy_moves = [move for move]
return self.possibleMoves[randint(0,3)]
I need the robot to clean the cell blocks. I am hoping to ensure it does that in less possible moves and of course save battery