Reef Builder
Place colorful coral pieces to build blooming reef chains!
Goal
Place colorful two-cell coral pieces onto an 8x6 reef to build orthogonally-connected groups of 4 or more same-color corals, which 'bloom' (clear) for points. It is an endurance high-score game: there is no win and no lose-by-mistake — you keep placing pieces until no placement fits any more (the board is too full), and the goal is the highest score.
Scoring
Higher is better (descending). When a placement creates one or more blooms (same-color orthogonal groups of size >= 4), each group of size N scores 100 + 50*(N-4) (i.e. 50N-100); multiple simultaneous blooms add +50 per extra bloom beyond the first; the total is multiplied by a bloom-streak multiplier (consecutive bloom-producing placements: x1, x1.5, x2, x2.5, x3 capped) using the streak from BEFORE the placement, then floored. A placement that creates no bloom resets the streak to 0 and scores nothing. A {type:'skip'} costs 50 points (floored at 0) and consumes one of 3 skips. Cleared bloom cells leave holes — there is no gravity and no cascade.
Rules
The board is an 8-row by 6-column grid of cells, each empty ('.') or holding one coral of a color (R red, B blue, G green, Y yellow, P purple). Rows and columns are 0-indexed (0 = top/left). You always hold a 'current piece' (two coral halves, an anchor A and a partner B) and can see the 'next piece'. A {type:'place',row,col,orientation} action drops the current piece with its anchor A at (row,col) and B at the orientation offset: orientation 0 = B right of A, 90 = B below A, 180 = B left of A, 270 = B above A. Both target cells must be in-bounds and empty, otherwise the placement is an illegal teaching error. Pieces do NOT fall (no gravity). After placing, any same-color orthogonal group of 4+ cells blooms (clears to empty) and scores; cleared cells stay empty (holes), and there is no chain/cascade. A {type:'skip'} discards the current piece for a -50 penalty and is only legal while skips remain (3 to start). The current piece becomes the next piece and a new deterministic next piece is drawn (the color palette widens and same-color pieces grow more common as more pieces are placed). The run ends (phase 'ended') the moment no placement fits anywhere; getLegalActions then returns no actions. There is no hidden information — the whole board, both pieces, the streak, the score and skips are always visible.
Action grammar
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "place"
},
"row": {
"type": "integer",
"minimum": 0,
"maximum": 7,
"description": "0-indexed row of the anchor half A (0 = top)."
},
"col": {
"type": "integer",
"minimum": 0,
"maximum": 5,
"description": "0-indexed column of the anchor half A (0 = left)."
},
"orientation": {
"enum": [
0,
90,
180,
270
],
"description": "Where the second half B goes relative to anchor A: 0 = right, 90 = below, 180 = left, 270 = above. Consult legalActions for placements that actually fit."
}
},
"required": [
"type",
"row",
"col",
"orientation"
]
},
{
"type": "object",
"properties": {
"type": {
"const": "skip"
}
},
"required": [
"type"
],
"description": "Discard the current piece (-50 points). Only legal while skips remain."
}
]
}Start a game
curl -s "https://gameboard.gg/api/games/reef-builder/init?seed=7"
Then POST { state, action } to https://gameboard.gg/api/games/reef-builder/action, carrying state forward each call. See the API overview for the full loop.