Create a hangman game for smart glasses with 526x100px 1-bit display
- hangman.ts - Core game logic and bitmap generation
- words.ts - Word list (100 words)
- index.html - Simple webpage with input and bitmap display
- bitmap.ts - Bitmap generation utilities (1-bit BMP format)
- font.ts - Simple pixel font for text rendering
- PLAYING - Active game, accepting letter guesses
- WON - Player guessed the word
- LOST - Player ran out of guesses
- WAITING_RESTART - Showing win/lose screen, waiting for "play again"
+--------------------------------------------------+
| H A _ _ M A _ GUESSED: A B C D E F |
| |
| O WRONG: 3/6 |
| /|\ |
| / \ |
| |
+--------------------------------------------------+
- Single letter input → process guess
- "play again" → restart game
- Any other input → ignore or show error
- Draw background (white)
- Render word with blanks
- Render guessed letters
- Draw hangman based on wrong count
- Render status (wrong count)
- Convert to 1-bit BMP
- Use simple 5x7 pixel font
- Monospace for alignment
- Scale up if needed for readability
- Create bitmap utilities for 1-bit BMP
- Implement simple pixel font
- Create word list
- Build core game logic
- Create bitmap renderer for game state
- Build simple web interface
- Test and iterate on layout
- Input: Web form with text input
- Words: Hardcoded list of 100 words
- Flow: Win/lose → "play again" to restart
- Output: 1-bit BMP files displayed in browser
- Hangman: Classic 6 wrong guesses progression
- Case: Case-insensitive input
- Architecture: Multi-user support via userId:gameState map
- Files: Save as hangman_user.bmp (will scale to hangman_userId.bmp)
- Frontend: HTML only for display simulation, all logic in backend TS