📜 ⬆️ ⬇️

Hacken und minen

image

Hacken und minen

Logs and mines - an ancient German game. The game's plot resembles chess etudes.
Interested in the puzzle, I checked the Appstore. Search failed.
And I filled the world gap.

Rules of the game


I remind the rules of the game - given a chess field of 8 by 8 cells. On it are thrown N min and N logs. N in the range from 2 to 6.
Logs can be moved according to the rule of a chess rook. Jump over other logs can not. When crossing mines and logs - both items are removed from the board. The goal is to eat all the mines and all the logs.
')
If the log does not encounter any obstacles while moving, it flies off the board, the etude is considered unresolved.

I dare to offer you three etudes, the solution of which will bring mathematical pleasure.


Etude number 5 exposing


On the iPhone, the initial layout of etude number 5 looks pretty artistic.

image

In the text and numbers alignment looks stricter.

11-2-- ---2x- x----- 33--x- 4-x--- 4-x--- ------ ----55 

As you can see, if the first move is to move the log number 4 to the right - it will eat two mines at once and the task becomes unsolved.

Solution Etude Number 5




Decision time does not matter, I started it exclusively for fans of high-speed driving with your fingers.
In addition, I have limited the field to the proportions of the iPhone (6 to 8), which is why the game has not lost its complexity and intellectual charm.
The program generates 10,000 layouts. Some are very interesting, at least for me. I suggest you warm your brains.

Three etudes 6, 11 and 23


image

Who wants to solve etudes is not in the mind, but on a personal iPhone - welcome to the testers with your Apple ID.
There are no games in the store. Virgin

Conclusion


In the development process, inspired by the story blind_designer , I numerically modeled the movement of surface waves.
If the topic is interesting - I will publish the algorithm. Rating will replace the survey.

For the owners of the iPhone in the store there is a game in which I implemented this algorithm to solve another classic problem about cabbage, goat and wolf .
The application is free, link by picture.

image


On the old iPhone, the Paper Cutter app slows down. In the new Haken und Minen puzzle, the brakes are removed by optimizing -O3 and discarding the if statement inside the cycles.
All former pioneers - with the holiday.

Source: https://habr.com/ru/post/256377/


All Articles