House of Mirrors House of Mirrors
Undefined
English

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

There is a house of mirrors filled with monsters (ghosts, vampires and zombies). Inside, the mirrors are arranged to show what's on the right or left (so you can't see yourself).
As you probably know,

  • ghosts are not visible except through a mirror,
  • vampires have no reflection,
  • zombies are always visible.

You will have to fill in the plan of the house with these monsters. For this, we give you the plan, the number of ghosts/vampires/zombies and the number of monsters that can be seen from outside.

The rectangular house will be represented by a tuple of strings. Empty places by '.', mirrors by '\\' and '/', ghosts by 'G', vampires by 'V', zombies by 'Z'. Elements are separated by spaces (input and output).

Input: A tuple of strings, a dictionary (keys: 'ghost', 'vampire', 'zombie' ; values: integers) and a dictionary (keys: 'N', 'S', 'W', 'E' which stand for North, South, West, East ; values: lists of integers).

Output: A tuple/list/iterable of strings.

Example:

4x4 example image

2 ghosts, 2 vampires, 4 zombies
('. \ . /',                 ('Z \ V /',
 '\ . . .',       ===\       '\ Z G V',
 '/ \ . \',       ===/       '/ \ Z \',
 '. \ / .')                  'G \ / Z')

For example, looking at column 2 from the north, you see monsters at (0, 2), (1, 2),
(2, 2) and (3, 0). The first three directly, the last one through mirrors.

Looking at column 2 from the north in the solution, you see them all
except the ghost at (1, 2), so three monsters as expected.
checkio(('. \\ . /',
         '\\ . . .',
         '/ \\ . \\',
         '. \\ / .'),
        {'ghost': 2,
         'vampire': 2,
         'zombie': 4},
        {'N': [3, 0, 3, 0],
         'S': [2, 1, 1, 4],
         'W': [4, 0, 0, 0],
         'E': [0, 3, 0, 1]}) == ('Z \\ V /',
                                 '\\ Z G V',
                                 '/ \\ Z \\',
                                 'G \\ / Z')

To play the puzzles / tests yourself: 1 2 3 4 5 6 7 8 9 10 11 12 13

Preconditions:

  • All puzzles have an unique solution.
  • 4 ≤ len(grid) ≤ 7 and 4 ≤ len(grid[0]) ≤ 7.
  • all(len(row) == len(grid[0]) for row in grid).

Settings
Code:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=py config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

×
 
 
<< <
> >>
exec

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Share your own solution
Go to the next mission Back to the list of missions Back to the map