Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman

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.

Requirements

  • Novus 0.2.7 or newer
  • Nox 3.4.2 or newer
  • A terminal; the current prebuilt release is for Linux x86-64

Build and run

git clone https://github.com/MJDaws0n/Hangman.git
cd Hangman
nox init
novus main.nov
./build/linux_x86_64/main

nox 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.nov

Standalone source example

main_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_nolib

Prebuilt Linux release

Download hangman-1.0-linux-x86_64, then run:

chmod +x hangman-1.0-linux-x86_64
./hangman-1.0-linux-x86_64

About

A Hangman game demonstrating the Novus compiler and Nox package manager

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors