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 the player board, a name and a natural positive number that we would refer to 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>\r\n
<number of favour> <width> <height> <encoding of costraint #1,...,encoding#width*height>\r\n

Every constraint would be represented by a pair of characters a number, between 1 and 6, and a letter that 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