This is the famous Chinese game 五子棋 - WuZiQi - also known as Five-in-a-Row/Gomoku.
had an idea on how to keep track of game states, so I am going to try and implement it! (update: many brilliant ideas tested were impractical so went for a simple solution).
I thought I might first test myself on Tic-Tac-Toe, as they are very similar and in fact differ only by goalposts and field-size.
TODO: add (info) button on the rules of the game. A reset/restart option, countdown section, maybe live-version of pick from the cup of beans, explanations of the colors, pick 12x12 or 15x15, lastly option to type in names. To fix feedback submission issue so that a sweetalert popup fires to say thank you, i.e. disable action attribute of form and prevent refresh of page. Later, add option to play against robot.