Name | Modified | Size | Downloads / Week |
---|---|---|---|
v2.0 | 2025-06-09 | ||
main.c | 2025-03-27 | 27.6 kB | |
readme.txt | 2015-08-13 | 2.7 kB | |
license.txt | 2015-08-10 | 32.5 kB | |
Makefile | 2015-08-05 | 1.1 kB | |
horsetrack.c | 2015-08-05 | 23.4 kB | |
horsetrack.h | 2015-08-05 | 1.9 kB | |
Totals: 7 Items | 89.1 kB | 0 |
readme.txt Created on: Aug 10, 2015 Author: John Winston Pierce jwpierce1830@yahoo.com INTRODUCTION This is the first release of NCURSES Derby horserace. This program is designed to be ran in Linux terminals using the command shell. It is a simulation of a horse race using characters ( ~/^\^ ) to represent the horses on a straight horizontal track. This program is released under the Gnu Public License. For license information see the license.txt file. For installation information see the INSTALL section of this document. REQUIREMENTS This program has been tested on Ubuntu 14.0 and Slackware 14 systems. This program as you could probably guess needs NCURSES to run. It also needs the menu library and I have plans to add the form library soon. It should not be too hard to port to other systems since NCURSES is a fairly standard library. INSTALL On Linux systems you can use the make utility by being in the directory where you have the source files entering the command make. The make file has options to make clean which will delete the .o files and make very-clean to also remove the executable. RUNNING To start the program enter the shell command ./horserace in the directory where the executable file is created or any directory where you move the executable produced by the make process. If you build the application from the shell prompt directly (gcc horserace.c -lncurses -lmenu -o <executable>) then you must enter your own executable name to run the application. The program is menu driven. Use the up and down arrow keys to make menu choices and enter to execute your choice. To start you should choose which horse and what place you expect them to finish under "2. Betting". Then use the "3. Race" menu choice to watch the race. The "4. Results" will show you the finish results and payoff. Move the highlight to "Exit" and press enter to leave the program and return to a shell prompt. Their is very little error checking currently so wrong choices in the betting window are not caught. Enter only a horse number then W, P or S and the C to continue or R to change your "ticket". You will see your choice of horse and finish position on the lower left corner of the racing window. If you have picked a not existent horse or something other the W for win P for place or S for show then you will always loose. Horse moves are random with no horse given a higher chance of winning. You should not notice any constant winners or losers. Currently payoffs are lower for lower numbered horses and bigger for higher numbered horses and the odds and payoffs never change. KNOWN BUGS CHANGE LOG