Crack the Code Game in SL360
Created by Aman Vohra

Crack the Code Game in SL360

Hello everyone,

How good is your logical reasoning skills?
Not Sure?
Here's a way you can test just that!

I created a game based on the classic Mastermind game.

In this game, you have to decrypt a 3-digit code required to open the combination lock using a series of statements before the time runs out. Keep in mind guessing the correct numbers is not enough. You additionally have to arrange those numbers in the correct sequence.

Aman Vohra

The game consists of two levels. Your score begins with 100 Points and keeps decreasing by one point every second. You also get stars based on your performance (the earlier you can solve, the more stars you can earn).

Aman Vohra

On the combination lock, there are three numeric entry boxes. Unless you enter the digits in these boxes, the unlock button remains disabled.

Problem faced with using Numeric Entry Boxes: Had to restrict the number of digits entered into the numeric entry boxes to 1 but could not find a proper solution. If you have any idea, then please let me know.

Solution: The best way around I could think of was using JavaScript to show only the 1st number entered into the numeric entry box and truncate the rest of the numbers that follow when the numeric entry box loses focus.

For example: If you input 09, 799, and 2913, the numbers retained in numeric entry boxes will be 0, 7, and 2.

Aman Vohra

Ideally, you should be able to work with the statements and progress in the correct direction. In case if you get stuck somewhere, you have two "Hint" buttons.

Hint 1: Is enabled when your score reaches 50 points.

Aman Vohra

Hint 2: Is enabled when your score is less than or equal to 30 points.

Aman Vohra

If you could not guess the correct combination for the lock within the specified time, an information (i) marker appears on the lock which when clicked, shows a video with detailed explanations.

Aman Vohra

I hope you like it and were able to crack the codes. Any suggestions/improvements are always welcome.

Here's a YouTube video demo:

Mobile Compatible Output: https://bit.ly/CrkDCod2

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics