braheezy / hangman

Hangman TUI :skull_and_crossbones:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo

hangman

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 :)

Installation

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!

Feature Status πŸ₯³

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
  • Clear terminal screen πŸ’₯
    • Before launching, clear the entire screen for maximum cleanliness
  • Sanitize better 🌎
    • Characters like . and nothing are deemed okay. That's stupid
  • 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.
  • 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

More

Light mode support πŸ₯³

demo

Contributing

Please contribute! For small things, please fork and open a PR. For large changes, please submit an Issue first.

About

Hangman TUI :skull_and_crossbones:

License:MIT License


Languages

Language:Go 100.0%