Creating of square game

I made this game in 10 minutes and I recorded the process. A board is generated and wherever you click switches the tiles where you clicked in a + shape, being the tile you clicked and the ones present that are above/below/adjacent. The goal is to turn the whole board red.

file:
squaregame.rbxl (11.9 KB)

5 Likes

“This video is private”?

whoops. fixd

Glad to see you got that squared away.

1 Like

Solve this

4 Likes

not every arrangement is solveable, by the way, which is why the generation part just makes a bunch of random moves rather than setting the cells to random values. 4x4 for example only has 4096 different reachable/solvable boards out of the 65536 different ways you can color the squares in binary white/red, and of those 4096, there are 314 left over after eliminating reflections and rotations and swapping red and white.

would like to know about higher sizes, but the number of combinations to try grows by a factor of 2^(2n+1) for board size n x n so 5x5 has 512x as many combinations of moves to try as 4x4 and 6x6 has 2048x as many as 5x5; quadruple the factor so forth.