A small terminal Hangman game written in Novus. It is a simple demonstration of
the Novus compiler and Nox package manager, using the std and process
packages declared in libraries.conf.
The first player enters a secret word, then the guesser enters one letter at a time. The game redraws the board after each guess and ends after six incorrect guesses or when the word is completed.
- Novus 0.2.7 or newer
- Nox 3.4.2 or newer
- A terminal; the current prebuilt release is for Linux x86-64
git clone https://github.com/MJDaws0n/Hangman.git
cd Hangman
nox init
novus main.nov
./build/linux_x86_64/mainnox init keeps the existing source and manifest, creates lib/, and downloads
any missing packages listed in libraries.conf. novus main.nov then compiles
the program and places the native executable under build/<os>_<arch>/.
On another supported target, run the executable from the corresponding build directory. You can also cross-compile with a Novus target flag, for example:
novus --target=linux/arm64 main.novmain_nolib.nov is a Linux x86-64 version with no package imports. It contains
the complete subset of string, array, terminal I/O, and process functionality
needed by the game, including the raw Linux syscall wrappers.
It builds without running Nox or having a lib/ directory:
novus main_nolib.nov
./build/linux_x86_64/main_nolibDownload hangman-1.0-linux-x86_64, then run:
chmod +x hangman-1.0-linux-x86_64
./hangman-1.0-linux-x86_64