This app is a pygameTM approach to a boardgame Pentrack.
The premise of Pentrack is similar to Carcassonne where the players lay out the tiles and get points for the features of constructed map. Among the features are railroads, stations and factories which can set a plot of the game in the times of industrial revolution. The very special thing is that the game is played with pentagonal tiles which may have never been used in such a way before.
To exactly place the pentagonal tiles we use the number field generated by coordinates of vertices of unit regular pentagon. Because of the discrete character of the computations, it suffices to consider 4 integer coordinates for a number (8 integers for a single point).
At the start of each move player selects a new position adjacent to the already placed tiles. The next tile to add is presented in the top-right corner. When the position is marked, all possible arrangements (rotations) of the next tile are displayed on the right and the player can choose one of them. Until an item from the list on the right is clicked, the position can be changed by clicking on another available place. Of course this will lead to an update of the list of legal moves.
When the tile arrangement is chosen, player has a chance to mark it with their piece. Number of pieces left is shown on top. Piece can be placed close to any of the 5 edges of the tile. For now the game does not process this location in any way nor does it constrain the player on the choice of piece position. Only the number of used pieces is limited. An empty tile cannot be claimed by putting a piece on it. Piece cennot be placed when the pleyer does not own a free one.
The piece-removel-mode can be then activated (Remove pieces button) allowing to remove any piece from the board. This stage of the game is not dedicated to a particular player, for as the result to one player's move, pieces of other players may be ready to be retrieved. The turn of the next player starts after clicking the NEXT MOVE button.
Until the next move starts, the current move can be corrected (restarted). This allows also to undo the piece removal.