Cycles are okay, as long as you can trace the path from one particular start point to one particular end point. This is defined to be: The longest contiguous single path (measured in roads) from start point to end point, that is not broken up by an opponents settlement or city. In Settlers, players get two victory points for having the "longest road". For Catan enthusiasts: there is no distinction between settlements and cities for the purpose of this problem, so I don't distinguish in the input string.Īll this is for the specification of the "input" string.One player may only have 15 roads on the game board.All settlements and cities are guaranteed to be at least two edges from the nearest other settlement / city (yours or otherwise).Each road network is guaranteed to have at least one settlement.See the orange settlement breaking apart the red road on the right side of the sample image. Each color will have at most two contiguous road networks, which may or may not be broken apart by other players settlements / cities (vertex buildings). Boards are otherwise guaranteed to be valid according to the rules of Settlers, which means: Any letter may indicate a player color, but there will at most four colors (including empty). Using R for Red, O for Orange, and B for Blue, and _ for nothing, the pictured board would be encoded as: _RR_R_Ī board like this will be your input string. Then we have a column of only roads, and so forth. We encode the placement of these pieces by using the following scheme: From the top, we have a row horizontal vertices and edges where a road can be placed. The roads (the long stick pieces) and the settlements (and cities) are rendered by the little huts. This is an endgame board of Settlers of Catan:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |