[New game]: flames Game #3750
Labels
gssoc
GSSoC24 program label
level3
Adding new features
New Game 🎮
This is the label that will be used on issues that are raising new game issue
🎮 Game Request
🎮 Game Request: Flames Game
Describe the game logic and also give a brief about the features of the game
Game logic and basic description:
The Flames game is a classic game that determines the relationship between two people based on their names. "FLAMES" stands for Friends, Lovers, Affectionate, Marriage, Enemies, and Siblings. The game takes the names of two people, combines them, and calculates the number of unique characters. This number is then used to find out the relationship from the FLAMES acronym.
Features:
User Input: The game takes two names as input from the user.
Character Combination and Counting: Combines the characters from both names and counts the occurrences.
Flames Calculation: Calculates a number based on the character count and uses this number to determine the relationship.
Relationship Result: Displays the resulting relationship from the FLAMES acronym.
Interactive UI: User-friendly interface with input fields and a button to calculate the result.
Real-Time Feedback: Provides instant feedback on the relationship based on the input names.
Point down the features
🎮 Game Request: Flames Game
Describe the game logic and also give a brief about the features of the game
Game logic and basic description:
The Flames game is a classic game that determines the relationship between two people based on their names. "FLAMES" stands for Friends, Lovers, Affectionate, Marriage, Enemies, and Siblings. The game takes the names of two people, combines them, and calculates the number of unique characters. This number is then used to find out the relationship from the FLAMES acronym.
Features:
User Input: The game takes two names as input from the user.
Character Combination and Counting: Combines the characters from both names and counts the occurrences.
Flames Calculation: Calculates a number based on the character count and uses this number to determine the relationship.
Relationship Result: Displays the resulting relationship from the FLAMES acronym.
Interactive UI: User-friendly interface with input fields and a button to calculate the result.
Real-Time Feedback: Provides instant feedback on the relationship based on the input names.
Detailed Game Logic:
Input Names: Users enter two names into the input fields.
Normalize Names: Converts both names to lowercase and removes any whitespace.
Combine Names: Combines the two normalized names into one string.
Character Count: Counts the occurrences of each character in the combined string.
Flames Number Calculation: Sums the counts of unique characters.
Modulo Operation: Uses the sum to index into the FLAMES array using modulo arithmetic.
Display Result: Displays the corresponding relationship based on the index.
Example Calculation:
Names: Alice and Bob
Combined: alicebob
Unique character count: (a, l, i, c, e, b, o, b)
Sum of occurrences: 8
Index for FLAMES: (8 - 1) % 6 = 1 (Lovers)
I am Contributing upon Gssoc24
Select program in which you are contributing
GSSoC24
Code of Conduct
The text was updated successfully, but these errors were encountered: