Commits

Anonymous committed 5fba3e0

Don't ship with (old) .beams, add driver script, dotignores.

Comments (0)

Files changed (6)

+*.beam
+syntax: glob
+
+*.beam
 Flip
 ====
 
-*Flip* is a very simple computer game by John S. James which first appeared
-in the March/April 1977 edition of *Creative Computing*.
+This is Cat's Eye Technologies' distribution of the game of _Flip_.
+
+Flip is a very simple computer game by John S. James which first appeared
+in the March/April 1977 edition of _Creative Computing_.
 
 In the game, the computer flips a virtual coin 50 times, and the object is
 for you to guess whether the coin will come up heads or tails each time.
 randomness thrown in, too.
 
 This version of the game is written in Erlang, based largely on the version
-written in BASIC by Steve North appearing in *More BASIC Computer Games*,
+written in BASIC by Steve North appearing in _More BASIC Computer Games_,
 Ed. David H. Ahl (ISBN 0-89480-137-6).  Note that in this implementation,
 heads and tails are called `Y` and `N`.
 
 Running
 -------
 
-Start an Erlang shell, load the `flip` module, and run `flip:start()`.
+To build the `flip` module, run the script `make.sh` from the root
+directory of the distribution.
+
+After the module has been built, the game can be played by running the
+script `flip` in the `bin` directory.  This script can be run from anywhere;
+it knows to locate the module in the distribution directory.
+
+Playing the Game
+----------------
+
+Each time the computer prompts you with a question mark, type 'Y' to
+guess that the flip was heads, or 'N' to guess that the flip was tails.
+A correct guess will be signalled by an asterisk printed before the
+next question mark.  At the end of the run (by default 50 flips,) your
+score will be printed.
+#!/bin/sh
+ERL_LIBS=`dirname $0`/../../ erl -noshell -run flip -run init stop

ebin/flip.beam

Binary file removed.
+#!/bin/sh
+
+if [ ! -d ebin ]; then
+  mkdir ebin
+fi
+for FILE in src/*.erl; do
+  erlc -o ebin $FILE
+done