Fueled by Curiosity — Driven by Creativity — Guided by Compassion
It's been years since I've written any of my own JavaScript code, but I'm still proud of this little accomplishment. In less than 100 lines of code, I was able to write the operating functions to emulate the sliding tile games I loved to solve when I was a kid.
To play, click on a tile in the same row or column as the empty space to slide the tiles into that space. Slide the tiles around until the tiles form a complete picture.
Here's another JavaScript experiment I decided to work on after watching a PBS documentary on cryptographic methods used throughout history. The method involves creating a cipher matrix based on a given keyword. I decided to expand the available character set for the keyword beyond the alphabet to just about any character you can type (numbers, spaces, punctuation).
As with the script for the puzzle above, I was really happy with the brevity of my code—less than 50 lines this time!
To see the code in action, enter a keyword of whatever length you choose. The longer the keyword, the more difficult the code will be to break. Then type a message, and click the "Encrypt Message" button. You'll see your message turned into gibberish. Enter the same keyword in the next keyword field, and click the "Decrypt Message" button. You'll see your message decoded in the bottom text field, where it's easy to read once again!