React Puzzle Builder

Here’s a builder I’m working on as part of a puzzle app πŸ™‚ I should write a longer blog post about the project instead of just dropping surprise screenshots here, but I’m just having fun coding it!Β πŸ˜‰

4 thoughts on “React Puzzle Builder

  1. PantsStatusZero says:

    I do wonder about the logic behind the game your using. I think I would have cheated and used css classes as markers and then used the .not() selector with either javascript or jquery to check the logic. But you seem to be doing the check in the background or something else wonderful.

    • JCLaHoot says:

      The validation loop is pretty crazy πŸ˜… it’s one thing to manipulate tangible data (the outputs make sense), but logical conditions are abstract, and even more so when you perform logical operations and transformations on them.

      The check happens via Javascript, but because it only relies on the conditions being satisfied, some puzzles could potentially have hundreds of possible solutions. There’s also some pre-processing of the puzzles when the page loads to turn a human readable piece of logic into something that’s broken down into equivalent, simpler parts.

      What I realised by doing this is that people are VERY good at learning and understanding a new piece of logic, but programming a single piece in a way that mimics the thought process accurately is extremely laborious. It’s crazy how we take complex thoughts for granted!

  2. JCLaHoot says:

    I could have hard-coded it and stuck with shapes, but I wanted to make it polymorphic since that opens up so many more possibilities! It wasn’t particularly complex once I figured out the data structure, but naming incredibly generic things in a way that’s readable later is really difficult…

Leave a Reply