Javascript Implementation of Nelson Rules Can be seen from the spec on wikipedia http://en.wikipedia.org/wiki/Nelson_rules