Light Up Light Up
English
The mission is in Blocked Mode. Access to the solutions is blocked for a day or two (even after you share your own), until we'll have enough solutions for you to check. All users who've solved the mission will get the notifications about their opening.

This mission is an adaptation of the "Light Up" game (from Simon Tatham's Portable Puzzle Collection). If you are lost or just want to play, the game is available here.

You're on a rectangular grid and have to light all the cells. For that, you have to put some lights in dark cells (so no light should illuminate another). The lights that you have illuminate in the four directions from wall to wall. And there are constraints: some walls...

The grid will be represented by a tuple of strings. Cells that are in the dark will be represented by ' ' and walls by 'X' and numbers '0', '1', '2', '3' and '4'.

You have to return coordinates of all lights you want to illuminate the entire grid.

7x7 example image

Possible lights: [(0, 5), (5, 6), (3, 3), (4, 4), (0, 0), (2, 2),
                  (6, 5), (6, 1), (5, 0), (1, 1), (1, 6)]

('    1  ',
 '   0X  ',
 'X2     ',
 ' 0   0 ',
 '     11',
 '  X0   ',
 '  1    ')

A tuple of strings.

An iterable of tuples/lists of two integers.

list(checkio(('    1  ',
              '   0X  ',
              'X2     ',
              ' 0   0 ',
              '     11',
              '  X0   ',
              '  1    '))) = [(0, 5), (5, 6), (3, 3), (4, 4), (0, 0), (2, 2),
                              (6, 5), (6, 1), (5, 0), (1, 1), (1, 6)]

You should be an authorized user in order to see the full description and start solving this mission.