Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f0cf66d

Browse files
Merge pull request avinashkranjan#2929 from andoriyaprashant/branch39
Cryptic Language Puzzle Script Added
2 parents 1a2e0a9 + 469ccaf commit f0cf66d

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

‎Cryptic Language Puzzle Game/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Cryptic Language Puzzle Game
2+
3+
Welcome to the Cryptic Language Puzzle Game! This is a simple Python game where players need to decipher messages encrypted in a cryptic language. The goal is to progress through the game by correctly deciphering the messages.
4+
5+
## How to Play
6+
7+
1. Make sure you have Python installed on your system.
8+
2. Download or clone this repository.
9+
3. Open a terminal or command prompt and navigate to the repository's directory.
10+
4. Run the game by executing the following command:
11+
12+
```shell
13+
python cryptic_language_game.py
14+
```
15+
- Follow the on-screen instructions.
16+
- You will be presented with a cryptic message. Try to decipher it using the provided mapping.
17+
- Enter your guess and see if you deciphered the message correctly.
18+
- Your score will increase for each correctly deciphered message.
19+
20+
## Features
21+
- Multiple cryptic messages for variety.
22+
- Score tracking to keep track of your progress.
23+
- User-friendly prompts and instructions.
24+
25+
## Customization
26+
27+
- You can customize the messages list in the script to add more messages for players to decipher.
28+
- You can modify the cryptic_language dictionary to create your own cryptic language mapping.
29+
30+
## Further Enhancements
31+
32+
This game can be further enhanced and expanded with additional features:
33+
34+
- Increasing difficulty levels with more complex mappings.
35+
- Adding a timer to challenge players to decipher messages within a time limit.
36+
- Implementing a hint system for players who are stuck on a particular message.
37+
- Developing a graphical user interface using libraries like Tkinter or Pygame.
38+
39+
## Contribution
40+
Feel free to contribute to this project by submitting pull requests or suggesting improvements.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import random
2+
3+
cryptic_language = {
4+
'A': 'Q', 'B': 'W', 'C': 'E', 'D': 'R', 'E': 'T',
5+
'F': 'Y', 'G': 'U', 'H': 'I', 'I': 'O', 'J': 'P',
6+
'K': 'A', 'L': 'S', 'M': 'D', 'N': 'F', 'O': 'G',
7+
'P': 'H', 'Q': 'J', 'R': 'K', 'S': 'L', 'T': 'Z',
8+
'U': 'X', 'V': 'C', 'W': 'V', 'X': 'B', 'Y': 'N',
9+
'Z': 'M'
10+
}
11+
12+
messages = [
13+
"HELLO WORLD",
14+
"CRYPTIC PUZZLE",
15+
"PYTHON IS FUN",
16+
"SOLVE THE CODE",
17+
"GREAT PUZZLE GAME",
18+
"LEARNING PYTHON",
19+
"CHALLENGE ACCEPTED",
20+
"UNLOCK THE MYSTERY",
21+
"ENJOY THE PUZZLES",
22+
"BECOME A MASTER",
23+
"DISCOVER THE SECRET",
24+
"EMBRACE THE UNKNOWN",
25+
"CRACK THE CIPHER",
26+
"DECODE AND WIN",
27+
"MASTER THE CODE",
28+
"UNVEIL THE TRUTH",
29+
"EXPLORE THE PUZZLE",
30+
"PUZZLE SOLVER",
31+
"MIND-BENDING FUN",
32+
"THINK OUTSIDE THE BOX"
33+
]
34+
35+
def generate_message():
36+
return random.choice(messages)
37+
38+
def play_game():
39+
player_name = input("Enter your name: ")
40+
print(f"Welcome, {player_name}, to the Cryptic Language Puzzle Game!")
41+
print("You need to decipher the message to progress.\n")
42+
43+
score = 0
44+
45+
while True:
46+
encrypted_message = generate_message()
47+
print("Decipher the following message:")
48+
print(encrypted_message)
49+
50+
guess = input("Enter your guess: ").upper()
51+
52+
if guess == encrypted_message:
53+
score += 1
54+
print("Congratulations! You deciphered the message.")
55+
print(f"Current Score: {score}\n")
56+
else:
57+
print("Incorrect guess. Try again.\n")
58+
59+
play_again = input("Do you want to play another round? (yes/no): ")
60+
if play_again.lower() != "yes":
61+
print(f"Thank you for playing, {player_name}!")
62+
print(f"Final Score: {score}")
63+
break
64+
65+
if __name__ == "__main__":
66+
play_game()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /