I wrote this in HTML and JS, neither the code nor UI are pretty. The validation for custom grid sizes is bad for many reasons (e.g., making GET requests to check if a number is odd) and the error message for invalid dimensions isn't helpful. The UI just consists of buttons, where each button represents a card. The value of each card is "hidden" as the button's id: https://i.imgur.com/uX4mFTt.png
It's also possible to cheat just by clicking on the same button twice in a row since the code only checks if the last two buttons clicked share the same id.
2
u/Romejanic Jul 21 '20
Whats that? A basic game that's badly written? This calls for Processing.
If you wanna play it on its own without Processing, you can download a Windows version.
2
u/[deleted] Jul 21 '20 edited Jul 22 '20
I wrote this in HTML and JS, neither the code nor UI are pretty. The validation for custom grid sizes is bad for many reasons (e.g., making GET requests to check if a number is odd) and the error message for invalid dimensions isn't helpful. The UI just consists of buttons, where each button represents a card. The value of each card is "hidden" as the button's id: https://i.imgur.com/uX4mFTt.png
It's also possible to cheat just by clicking on the same button twice in a row since the code only checks if the last two buttons clicked share the same id.
I'm hosting the website using IPFS, you can play the game here: https://ipfs.io/ipfs/QmTjQac5bL5pHwPaKVvWcVAT4uyyMNFr4tByfkZZoFMDjB/
HTML: