The best version of Codenames online is at - play there and buy the author a coffee! Also remember to buy the actual board game Here’s how this doc works:
Wordlist
We can get the entire list of 400 words from BoardGameGeeks: . It lives in the . Colors
Codenames has 4 colors. We use the and corresponding Hex Values to generate the little Circle Keys. Generating a new gameboard
This is where the fun lies. Generating a new game involves the following steps:
Pick a random set of 25 words. Color them with 8 Blue and 7 Reds. We don’t deal with the additional complexity of flipping reds and blues in every game. Pick one Black. The rest are beige. Insert everything into the current game table.
I solved this using an intermediate table. Some interesting tricks:
Coda doesn’t have a shuffle function, so its hard to just shuffle a list of things and take a slice. Instead, I dropped a Randomizer column, and used that to sort and then slice. Randomizer can be set to continuously generate randomness, which does the trick BUT requires the use of an intermediate table. The intermediate table is used to give out colors (which needs stability) followed by an additional shuffle. Everything is inserted into the game table. Finally, we need to arrange the cards in a column - a simple %5 on RowId() does the trick.
Actions are represented using buttons:
Clear state: Delete Intermediate Table
Create the final table: Master table
The net result of all this is the master table.
Fun Coda Tricks
You can create little color circles by using Rectangle(20,20,”#dd0011”).clipCircle to get You can cat images and words using Concatenate like this: To color actual text, you have to use an internal function _color like this: All coloring tricks were deprecated by using conditional formatting to show cards fully colored. RowIds are monotonically increasing and non-random. Praise coda eng 🙌