You are not logged in.
Hangman, as simply as possible. This is basically 80 lines of straightforward C code, and 80000 English words in a giant list.
AUR git: https://aur.archlinux.org/packages/hangman-git/
Source: https://github.com/bdjnk/hangman
For educational purposes, here is a fairly in depth analysis of the code
I haven't utilized this forum much, especially recently, but that's because my Arch installs work perfectly, and never break (seriously).
Speaking of which, this is my first AUR package, and my first C program released for actual public consumption, so if I've done something wrong, please let me know.
Thanks, and enjoy.
Last edited by bdjnk (2015-07-06 00:21:07)
Offline
Very nice! Even though it's small, not many people can say they've written a complete video game.
By the way, it's not true Hang Man unless I see a man get hanged! (But I'd even settle for a text description.)
Offline
Very nice! Even though it's small, not many people can say they've written a complete video game. :)
By the way, it's not true Hang Man unless I see a man get hanged! (But I'd even settle for a text description.) ;)
Thank you :)
I updated. Now it can use any wordlist and has a minimum word size option. Use 'hangman -h' for details.
Unfortunately I didn't yet add in an ASCII art hangman, nor even a description. So far it's non-violent hangman, for our politically correct era ;)
Offline
There's an idea... a "--rated-r" flag to enable "Blood and Gore" mode...
Nice job!
Currently running Arch on a Samsung Chromebook Pro (dual booted with ChromeOS), and various VPSes and Docker containers.
Offline
I've updated the original post with this fairly in depth analysis of the code. I wrote it a while ago, but never linked it. Anyway, there it is for your reading pleasure.
Offline
Out of curiosity, why did you choose to not use argp from glibc?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Out of curiosity, why did you choose to not use argp from glibc?
I don't recall having seen it before. Thank you for bringing it to my attention.
Even if I had seen it though, I doubt I would've used it for the same reasons I didn't use getopt. First, excessive overhead for a couple simple arguments. Second, you need to experience the pain before you can appreciate the salve.
Offline