Commits

catseye  committed 39317eb

Update README, dates, add BSD license, simplify worb.js, paths.

  • Participants
  • Parent commits ae4d3e9
  • Tags rel_1_1_2013_0330

Comments (0)

Files changed (6)

File README.markdown

 noit o' mnain worb
 ==================
 
-Language version 1.1. Distribution version 2010.0721.  
-Copyright ©2000-2010, Cat's Eye Technologies. All rights reserved.
+Language version 1.1. Distribution version 2013.0330.  
+Copyright ©2000-2013, Chris Pressey, Cat's Eye Technologies.  
+All rights reserved.
+
+What is this?
+-------------
+
+This is the reference distribution of *noit o' mnain worb*, a
+probabilistic particle automaton described (awkwardly) in the next
+section.
+
+It contains the reference implementation, as a Perl script which
+uses the (included) Console::Virtual library, in the `script`
+directory.
+
+It also contains an implementation in Javascript/HTML5, using
+modules (also included) from yoob.js, in the `impl/worb.js`
+directory.
+
+It also contains an implementation in Java, using the yoob
+framework (not included), in the `src` directory.
 
 What is noit o' mnain worb?
 ---------------------------

File impl/worb.js/TODO.markdown

-* speed control

File impl/worb.js/src/worb.js

 /*
- * requires yoob.Playfield
+ * worb.js -- An implementation of noit o' mnain worb, using yoob.js
+ * requires yoob.Playfield to be sourced before this file
  */
 
-/* An implementation of noit o' mnain worb, using yoob.js */
+/*
+ * Copyright (c)2011-2013, 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.
+ *
+ *   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
+ * 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.
+ */
 
 Bobule = function() {
     this.pressure = 1;
     /*
      * Iterate over every defined cell in the Playfield.
      * fun is a callback which takes three parameters:
-     * x, y, value.  If this callback returns a value,
-     * it is written into the Playfield at that position.
+     * x, y, value.
      * This function ensures a particular order.
      */
     this.foreach = function(fun) {
                 var value = this.get(x, y);
                 if (value === undefined)
                     continue;
-                var result = fun(x, y, value);
-                if (result !== undefined) {
-                    if (result === ' ') {
-                        result = undefined;
-                    }
-                    this.put(x, y, result);
-                }
+                fun(x, y, value);
             }
         }
     };
      * cellWidth and cellHeight are canvas units of measure for each cell.
      */
     this.drawContext = function(ctx, offsetX, offsetY, cellWidth, cellHeight) {
-        var me = this;
         this.foreach(function (x, y, elem) {
             elem.draw(ctx, offsetX + x * cellWidth, offsetY + y * cellHeight,
                            cellWidth, cellHeight);
     };
 };
 
-
 NoitOMnainWorb = function() {
     var canvas;
     var ctx;

File make-cygwin.sh

 #!/bin/sh -x
-make \
-    JAVAC='"/cygdrive/c/Program Files/Java/jdk1.6.0_22/bin/javac"' \
-    JAVA='"/cygdrive/c/Program Files/Java/jre6/bin/java"' \
-    PATHSEP=';' \
-    $*
+# Assumes you have `javac` and `java` on your PATH
+make PATHSEP=';' $*

File script/worb.pl

-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
 # noit o' mnain worb - fungeoid language based on brownian motion
 # v2007.1123 Chris Pressey, Cat's Eye Technologies

File src/WorbState.java

  */
 
 /*
- * Copyright (c)2011 Cat's Eye Technologies.  All rights reserved.
+ * Copyright (c)2011-2013, 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