Kafka - The Castle

This application is a logic solitaire game.
A 6x6 grid is shown. Every cell represents a room of a castle, with open doors on all sides.
You have to draw the map of the castle, closing some of the doors.

The number shown in every room indicates the total number of other rooms
visible from that one on straight lines, in all directions: up, down, left and right.

For instance, if you see the number 5 in a cell, it means that a total of 5 cells are visible from there:
maybe 2 left and 3 up, or 1 up, 2 down and 1 right, and so on.





Keep in mind that all the rooms can be reached from every other room:
there are no closed rooms, or closed groups of rooms.

To close a door, just tap on it.

If your guess is correct, the door will become a piece of wall,
its color will become dark, and you will hear a "toc" sound.

If your guess is bad, i.e. if the door must be left open,
its color will become yellow, you will hear a "deng" sound,
and your choice will be marked as a fault.

When the map is complete, you will hear a musical sound,
and an alert message will notify your success, or the total number of faults.