From 3169f4b6a1c253c3117cd73952cf0c55c11e66ab Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 18 Feb 2018 22:36:36 -0500 Subject: [PATCH] Fixed a bug with array sorting. Improved simple text mode. --- game.js | 2 +- recursive-desc.js | 14 ++++++++++---- recursive-macro.js | 22 +++++++++++----------- stroll.html | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/game.js b/game.js index fa92d86..e953227 100644 --- a/game.js +++ b/game.js @@ -76,7 +76,7 @@ function getOnePrey(area) }); potAreas = potAreas.sort(function (x,y) { - return x[1] < y[1]; + return y[1] - x[1]; }); for (var i=0; i y.area + return x.area - y.area; }); while(candidates.length > 0) { @@ -365,10 +365,10 @@ function Container(contents = []) { return describe_all(this.contents,verbose) } - this.eat = function() { - var line = containerEat(this); + this.eat = function(verbose=true) { + var line = containerEat(this,verbose); if (line == "") - return defaultEat(this)(); + return defaultEat(this)(verbose); else return line; }; @@ -409,18 +409,18 @@ function Person(count = 1) { } - this.stomp = function() { + this.stomp = function(verbose=true) { var line = personStomp(this); if (line == "") - return defaultStomp(this)(); + return defaultStomp(this)(verbose); else return line; }; - this.eat = function() { + this.eat = function(verbose=true) { var line = personEat(this); if (line == "") - return defaultEat(this)(); + return defaultEat(this)(verbose); else return line; }; @@ -728,10 +728,10 @@ function SmallSkyscraper(count = 1) { } - this.anal_vore = function(height=10) { - var line = skyscraperAnalVore(this,height); + this.anal_vore = function(verbose=true,height=10) { + var line = skyscraperAnalVore(this,verbose,height); if (line == "") - return defaultAnalVore(this)(); + return defaultAnalVore(this)(verbose); else return line; }; diff --git a/stroll.html b/stroll.html index 0e63a70..5fa527b 100644 --- a/stroll.html +++ b/stroll.html @@ -17,7 +17,7 @@
-
Welcome to Stroll 0.1.4
+
Welcome to Stroll 0.1.5
It's a nice day for a walk