Commits

Cat's Eye Technologies  committed 980fd79

Add README, update license verbiage (no "REGENTS".)

  • Participants
  • Parent commits 8891b40

Comments (0)

Files changed (3)

File README.markdown

+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.
+
+What makes it interesting is that the coin is not fair.  The computer tries
+to find patterns in your guesses, and exploit them by biasing the coin toss
+away from what it thinks you are likely to guess next.
+
+You can think of it as creating a Markov chain to model your guesses, and
+updating it each time you make a guess, based on your last few guesses.
+
+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*,
+Ed. David H. Ahl (ISBN 0-89480-137-6).

File doc/flip.html

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Module flip</title>
-
-</head>
-<body bgcolor="white">
-<h1>Module flip</h1>
-<ul><li>
-<a href="#index">Function index</a></li><li>
-<a href="#exported">Exported functions</a></li></ul>
-
-<h2>Description</h2>
-The venerable and ancient computer game of FLIP.
- 
-  <p>This version is coded in Erlang.  It is based on the
-  original game of FLIP by John S. James, as implemented in
-  BASIC by Steve North in <i>Creative Computing</i>, March/April 1977.</p>
- 
-
-<h2><a name="index">Function Index</a></h2>
-
-<table width="100%" border="1"><tr><th colspan="2" align="left">Exported Functions</th></tr>
-<tr><td><a href="#start-0">start/0</a></td><td>Plays a game of FLIP.</td></tr>
-</table>
-
-<h2><a name="exported">Exported Functions</a></h2>
-
-<h3><a name="start-0">start/0</a></h3>
-
-<p><code>start() -> ok</code></p>
-<p>Plays a game of FLIP.</p></body>
-</html>

File src/flip.erl

 %%% BEGIN flip.erl %%%
 %%%
 %%% flip - Cat's Eye Technologies' Erlang FLIP
-%%% Copyright (c)2002 Cat's Eye Technologies.  All rights reserved.
+%%%
+%%% Copyright (c)2002-2012, Chris Pressey, Cat's Eye Technologies.
+%%% All rights reserved.
 %%%
 %%% Redistribution and use in source and binary forms, with or without
 %%% modification, are permitted provided that the following conditions
 %%% are met:
 %%%
-%%%   Redistributions of source code must retain the above copyright
-%%%   notice, this list of conditions and the following disclaimer.
+%%%  1. Redistributions of source code must retain the above copyright
+%%%     notices, this list of conditions and the following disclaimer.
+%%%  2. Redistributions in binary form must reproduce the above copyright
+%%%     notices, this list of conditions, and the following disclaimer in
+%%%     the documentation and/or other materials provided with the
+%%%     distribution.
+%%%  3. Neither the names of the copyright holders nor the names of their
+%%%     contributors may be used to endorse or promote products derived
+%%%     from this software without specific prior written permission.
 %%%
-%%%   Redistributions in binary form must reproduce the above copyright
-%%%   notice, this list of conditions and the following disclaimer in
-%%%   the documentation and/or other materials provided with the
-%%%   distribution.
-%%%
-%%%   Neither the name of Cat's Eye Technologies nor the names of its
-%%%   contributors may be used to endorse or promote products derived
-%%%   from this software without specific prior written permission.
-%%%
-%%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-%%% CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-%%% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-%%% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-%%% DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
-%%% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-%%% OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-%%% PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-%%% OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-%%% ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-%%% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-%%% OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-%%% POSSIBILITY OF SUCH DAMAGE. 
+%%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+%%% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT
+%%% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+%%% FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+%%% COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+%%% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+%%% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+%%% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+%%% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+%%% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+%%% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+%%% POSSIBILITY OF SUCH DAMAGE.
 
 %% @doc The venerable and ancient computer game of FLIP.
 %%