Anonymous avatar Anonymous committed aa8c1e1 Draft

Don't ship with .beam; add README; move driver script to `bin`.

Comments (0)

Files changed (8)

+*.beam
+syntax: glob
+
+*.beam
+Animals
+=======
+
+This is Cat's Eye Technologies' distribution of the classic computer
+game of Animals, which demonstrates an "expert system".  This version
+is written in Erlang.
+
+Description
+-----------
+
+This game stores a 'knowledge tree' about the animals it knows in a
+nested tuple structure.  This is mainly to demonstrate how one can work
+with binary trees as Erlang terms.  A more serious implementation would
+probably use a real database system, such as Mnesia.
+
+To build the `animals` 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 `animals` in the `bin` directory.  This script can be run from
+anywhere; it knows to locate the module and the data files in the
+distribution directory.
+#!/bin/sh
+ERL_LIBS=`dirname $0`/../../ erl -noshell -run animals -run init stop

doc/animals.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Module animals</title>
-<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
-</head>
-<body bgcolor="white">
-<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<hr>
-
-<h1>Module animals</h1>
-<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The classic 'expert system' demonstration game of Animals.
-
-
-<h2><a name="description">Description</a></h2><p>The classic 'expert system' demonstration game of Animals.</p>
- 
-  This game stores a 'knowledge tree' about the animals it knows
-  in a nested tuple structure.  This is mainly to demonstrate how
-  one can work with binary trees as Erlang terms.  A more
-  serious implementation would probably use a real database
-  system, such as Mnesia.
- 
-<h2><a name="index">Function Index</a></h2>
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#start-0">start/0</a></td><td>Plays a game of Animals.</td></tr>
-</table>
-
-<h2><a name="functions">Function Details</a></h2>
-
-<h3 class="function"><a name="start-0">start/0</a></h3>
-<div class="spec">
-<p><tt>start() -&gt; ok</tt></p>
-</div><p>Plays a game of Animals.</p>
-<hr>
-
-<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
-<p><i>Generated by EDoc, Apr 29 2010, 14:56:32.</i></p>
-</body>
-</html>
Add a comment to this file

ebin/animals.beam

Binary file removed.

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

script/animals

-#!/bin/sh
-ERL_LIBS=`dirname $0`/../../ erl -noshell -run animals -run init stop
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.