Hey everyone! This Sliders brain-teaser game took me a week to code from scratch using only vanilla JS and CSS. It's really simple and fun to play - just read the instructions below. I challenge you to beat the highest score from the Leader Board! 😄
⚡️ Sliders ⚡️
- Play the game
- View the source code
- Explore the Github repo
- check out SOLITAIRE - my other awesome game!
How to Play Sliders 👉
- Choose the game size: 3x3, 4x4 etc...
- Slide pieces into the empty space from above, below or the side
- Position numbers in the correct order in the fewest possible moves
- Each move reduces the total score by 1
- Pieces turn green when in the correct position
- When all the pieces are correct you can add your score to the Leader Board
- See demo above ⬆
- Mobile friendly
- Includes Help section
- Initializing sequence to randomize game
- Leader board scores saved on the back-end with Google Firebase
- Many thanks to @yevbar (Yev Barkalov) for this Firebase tutorial and to @Jp2323 (Jorge P) for this Firebase repl
@rjlevy np this happens to my sites so often, so recently I just increased the security so much that people stopped. Have you tried storing you firebase creds in an environment file (.env)? Also only refer to them in local scope, that helps a lot so they wont be able to get to it from the console
Hi @generationXcode, I really wanted to and tried to implement a .env file but this doesn't seem possible with a front-end project like this. Unless you know of a way? I think it would need to be a node project with a server running and then install the dotenv node package.
How do you suggest I refer to variables in local scope? The score variable needs to be shared by src/Block.js and script.js. Any suggestions are much appreciated.
By the way, the firebase JS files have been obfuscated to help with security
Almost anything is hackable, one wrong line of code by the programmer and your in, even google etc have been hacked several times. My applications probably aren't secure either but its fun to hack lol