A Go TUI Hangman game built with the lovely BubbleTea framework.
This project exists to teach myself Go and learn about BubbleTea because it looks like an understandable, powerful, and pleasing looking TUI framework. My past attempt at a TUI in Python didn't go so well. It's already going much better with this project :)
The easiest way to run hangman
is to use one of the pre-compiled binaries in the Releases.
Or install it with go
:
go install github.com/braheezy/hangman@latest
Or from source, clone the project and run:
go run main.go
Enjoy!
The following is to be implemented:
- End game lose condition 🤕
- Yes, right now if you can't solve the word, the program crashes
- Show guessed letters
🅱️ 🅰️ - The user can't see which letters are guessed which is awkward when playing
- Beautification 😎
- Add Style to:
- Hangman graphic
- Hangman flashing on guesses
- User input area
- Header
- Footer
- Guesses
- Banner area and the various messages that appear there
- Add Style to:
- Clear terminal screen 💥
- Before launching, clear the entire screen for maximum cleanliness
- Sanitize better 🌎
- Characters like
.
and nothing are deemed okay. That's stupid
- Characters like
- Show word on loss 🤕
- Don't leave them hanging!
- Support light mode terminals 👼
- It works okay but it could be better for heathens using light color themes
- Handle screen resizing better 📏
- In
View()
use knowledge of window dimensions to smartly draw things:- If the keyboard doesn't fit, remove it
- If the title doesn't fit, hide it
- If the board tiles are too long, wrap them. This has been seen with long (10+ characters) words to guess.
- In
- Allow users to change theme 🎨
- Port the current color code definitions to some type of config file (YAML?)
- Read the file at runtime
- Build and distribute binaries 🚧
- Provide build instructions for eager beavers
- Make binaries and add to Releases
- CI/CD everything above
- Decide if implementing a scalable Difficulty mode is worth it
Light mode support 🥳
Please contribute! For small things, please fork and open a PR. For large changes, please submit an Issue first.