- Score more points than your opponent(s) at games end.
In the game, penguins hunt fish by jumping from ice block to ice block, trying to catch as many fish as possible, while taking care not to be blocked or isolated on the ice.
The board contains a grid of ice block
Each ice block contains 1, 2 or 3 fish
An Ice block with 0 fish is considered a sea hole, and must be avoided.
The game is played on a hexagonal grid 7 or 8 cells wide and 8 high.
The site https://www.redblobgames.com/grids/hexagons/ is a goldmine of information about working with hexagonal grids.
Each player has:
- 4 penguins (2 player game)
- 3 penguins (3 player game)
- 2 penguins (4 player game)
Move a penguin:
The player chooses one of his penguins and moves it respecting the following constraints:
- If all the player's penguins have not be placed, the player must put a penguin on the board on a free ice block.
- A penguin must move in a straight line, in one of the 6 directions that surround its ice block.
- A penguin can advance as many spaces as the player wants.
- A penguin cannot cross another penguin or a sea hole (a block of ice previously removed).
For example, the penguin on F4 can move on F5, E5, E4, D4, F3, G2, G1 but not on G4, H4 (hole in G4) and not on E6, D7, E8 (penguin in E6).
Remove a block of ice:
- The player removes the ice block on which the penguin started and eats all the fishes which were on the starting ice block.
- After the move, the player adds some points to their score:
- One fish: 100 points
- One ice block removed: 1 point
If only one player is still in the game, the game could end early if the last player is winning.
- Score less points than your opponent(s) at games end.
- You do not respond in due time or output an invalid command.
Second line: playerId: the ID of the player. '0', '1, '2, '3'.
Third line: nbPenguinsPerPlayer: the number of penguins avalable for each player.
Next nbRows lines: iceBlockLine: each char of the string is the number of fish on the ice block. If it is 0 it is a hole. First line is A1, B1, C1 ..., second line is A2, B2, ...
Next nbPlayers lines: score: the score of each players.
Next nbPenguins: the number of penguins on the board.
Next nbPenguins lines: id: id of the penguin ownerId: player id of the owner of the penguin pos: position of the penguin.
Next nbActions: the number of actions available.
Next nbActions lines: actions
A higher resolution is required to access the IDE