- C 100%
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| slots.c | ||
schizoSlots
Summary
Terminal Slots Game In Hexadecimal!
Select your gamemode. Normal is a casual luck-based game, and Keter is brutal, rewarding.
Press R to roll your schizo slots, in hopes of matching the truth. If you get matches, they get locked in and manifested.
Locking in slots awards bonus rolls.
Manifest all slots to win.
Unsure of how to compile on x system?
cc slots.c -o slots
Then run with
./slots
Details
The code is written to be portable accross Unix-like systems, and uses POSIX-standard sleep functions, as well as clearly defined int sizes.
It should work both on 32-bit and 64-bit processors, across any architecture capable of running Linux/BSD/Solaris/MacOS and whatever else you can come up with.
Currently tested on AMD64 Arch Linux, ARM64 Alpine Linux (Raspberry Pi Zero 2 W).
Windows is unstested, and likely needs a different sleep function, as well as a different way to seed random(), since Windows has no /dev/urandom.
If you'd like to play with the source code, you can adjust lower and upper bounds of generation, up to 8 bits (0x00-0xff). Currently, the game is set to 0x0-0xf, because randomly matching 8 bits is a 1/256 chance, and makes the game almost impossible to win. Make sure to add padding zeroes to the printouts.
If you'd like to go crazy and attempt to compile on 8/16-bit systems, the sleep and /dev/urandom seed functions need to be adjusted/removed. Unsure if any Unix even runs on such processors.