Overview
The Hangman game challenges you to guess a classmate’s name by selecting letters one at a time. You have 6 incorrect guesses before the game ends.URL Pattern:
/minijuegos/ahorcado/<group_id>/Minimum Students: 1 with profile pictureHow to Play
See the Blank Spaces
The student’s name is displayed as underscores (
_) for each letter. Spaces and non-alphabetic characters are shown.Click Letters
Click letters from the alphabet grid to make your guesses. Used letters become disabled.
Watch Your Mistakes
Each incorrect letter adds to your mistake counter. You can make 6 mistakes before losing.
Game Mechanics
Text Normalization
The game uses advanced text normalization fromminigames/views.py:12-18:
JosébecomesJOSEMaríabecomesMARIA- Case doesn’t matter
- Accents are removed
Scoring System
The game tracks two session variables:hangman_correct: Number of games wonhangman_total: Total games played
Letter Tracking
The game maintains a list of guessed letters in your session:- Already guessed letters are disabled and grayed out
- Correct letters appear in the name
- Incorrect letters increment the mistake counter
Game State
Session variables tracked:hangman_target_id: Current student IDhangman_target_name: Normalized name to guesshangman_guessed_letters: Array of guessed lettershangman_incorrect_count: Number of mistakes (max 6)hangman_game_over: Boolean indicating game endhangman_last_id: Previous student (to avoid repetition)
Alphabet
The game uses the Spanish alphabet including Ñ:Anti-Repetition Logic
Fromminigames/views.py:188-194:
AJAX Implementation
The game uses AJAX for letter guesses to provide instant feedback without page reloads. When you click a letter:Tips for Success
Start with Common Letters
Start with Common Letters
Begin with frequently used letters in Spanish names like A, E, O, R, I, N.
Use the Picture Clue
Use the Picture Clue
The profile picture can help you remember or guess the student’s name.
Watch for Patterns
Watch for Patterns
Spanish names often follow patterns. Look for common endings like -A, -O, -EZ.
Don't Guess Blindly
Don't Guess Blindly
With only 6 mistakes allowed, think strategically about your letter choices.
Game Over Handling
Fromminigames/views.py:178-186, the game automatically resets when you start a new round:
Your overall score (correct/total) persists across rounds and stays throughout your session.
Student Requirements
For this game to work:- Students must have a profile picture uploaded
- Students must have a name (uses
full_nameor falls back tousername)
Technical Implementation
View Function:hangman_game() in minigames/views.py:163-255
Key Features:
- Session-based state management
- Text normalization for flexible matching
- Anti-repetition logic
- AJAX for instant letter feedback
- Automatic game reset after completion
- Student filtering by profile picture presence
Next Steps
Try Face Guess
Type the full name instead of guessing letters
Complete Your Profile
Add your profile picture so others can play with you