Skip to content

Dinamic window pattern card

Daniele Parravicini edited this page Jul 4, 2018 · 9 revisions

Information about pattern cards can be gathered throught file. Pattern cards go in pairs. Each of them carry information about constraints the user has to respect in a particular position of its board, a name and a natural positive number, also called as difficulty, that resemble a number of favours a player should be given in a multiplayer game.

This is how a pattern card should look like in a file

We decided to use a simple encoding to represent a pattern card

<name>
<number of favour> <width> <height> <costraint #1,...,constraint#width*height>

Every constraint would be represented by a pair of characters. The first must be a number, between 1 and 6, and the second should identify the colour {W=> WHITE, G=> Green, Y=>Yellow, R=> Red, V => Violet, B=>Blue}.

An example of valid pattern card file follows

white test
0 4 5 0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W
other white test
0 4 5 0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W