Robot Looks Around


Collapse Content

Dirt isn't always at the sides of the room. Can you clean an entire room? To help you do so efficiently, you can use the following new method:

  • surrounding - This returns a 3x3 grid, with the robot located at the center in position 1,1.
  • You can call the method is_dirty? on any cell in the grid. For example surrounding[0][0].is_dirty? returns true is the top left corner of the surrounding is dirty.

Here's a sample grid that surrounding could return:

  012 
0 ☒☒☒
1 _♟⚂
2 _⚀__

surrounding[y][x] will return the tile located y rows down and x columns to the right. For example, surrounding[1][2] will return the tile with dirtiness level 3.

Challenge Specifics

  • The board is 10x10 excluding the walls.
  • The robot's full charge is 40 units of energy.
  • You must beat the level within 125 turns.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us