2024-12-24 23:04:34 +02:00

105 lines
2.7 KiB
Markdown

<p align="center">
<img src=https://hopdowody.pl/wp-content/uploads/2023/03/SMART-GAMES-IQ-MINI-Kod-producenta-5414301524489.jpg />
</p>
## Description
### Game
<!-- | | c1 | c2 | c3 | c4 | c5 |
| :----: | :-: | :-: | :-: | :-: | --- |
| **r1** | x | x | o | y | y |
| **r2** | x | x | x | x | y |
| **r3** | o | x | z | z | y |
| **r4** | z | x | z | o | y |
| **r5** | z | z | z | y | y | -->
<!-- html table -->
<style>
.z {
background-color: purple;
}
.x {
background-color: orange;
}
.y {
background-color: green;
}
td {
padding: 3rem;
}
table {
font-size: 3rem;
margin: 0 auto;
}
</style>
<table >
<tr>
<td class="x">x</td>
<td class="x">x</td>
<td>o</td>
<td class="y">y</td>
<td class="y">y</td>
</tr>
<tr>
<td class="x">x</td>
<td class="x">x</td>
<td class="x">x</td>
<td class="x">x</td>
<td class="y">y</td>
</tr>
<tr>
<td>o</td>
<td class="x">x</td>
<td class="z">z</td>
<td class="z">z</td>
<td class="y">y</td>
</tr>
<tr>
<td class="z">z</td>
<td class="x">x</td>
<td class="z">z</td>
<td>o</td>
<td class="y">y</td>
</tr>
<tr>
<td class="z">z</td>
<td class="z">z</td>
<td class="z">z</td>
<td class="y">y</td>
<td class="y">y</td>
</tr>
It's a 5x5 grid of holes, connected as shown in the diagram. Each colored path contains one peg which can be moved around to any other square with the same color. The point of the game is to fit the 6 uniquely shaped pieces in the puzzle such that all of them fit (and subsequently fill up the entire matrix).
### Pieces
Very similar to tetris:
![Tetris](https://static.vecteezy.com/system/resources/previews/009/102/301/original/set-of-colorful-blocks-for-tetris-game-illustration-vector.jpg)
The pieces are as follows:
#### 3-in-a-row
Effectively 2 different ways to place it. It's just 3 consecutive squares.
#### L shape
There are 4 different ways to place it. It's a 3-in-a-row with an extra square attached to one of the ends.
You can also use the third dimension and flip it, leading to 8 different ways to place it.
#### T shape
There are 4 different ways to place it. It's a 3-in-a-row with an extra square attached to the middle.
#### Square
1 way to place it. It's a 2x2 square.
#### Smaller L shape
There are 4 different ways to place it. It's a 2-in-a-row with an extra square attached to one of the ends.
#### 2 lines offset by 1
4 different ways.
## Optimization
- [ ] Bitmasking