Skip to content

Commit

Permalink
hooks for magical (move) method
Browse files Browse the repository at this point in the history
  • Loading branch information
manur committed Jan 11, 2012
1 parent bb83656 commit 72c43ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
var handler = function(command) {
if (command) {
try {
// if(command[0] = '(')
jqconsole.Write('==> ' + interpret(command) + '\n');
} catch (e) {
jqconsole.Write('ERROR: ' + e.message + '\n');
Expand Down Expand Up @@ -158,7 +159,7 @@
}

void draw() {
background(226);
background(24);
image( a, 0, 0 );

// output = interpret($('#program').val());
Expand Down Expand Up @@ -192,6 +193,9 @@
if (target_y < 0)
target_y += height;

if(typeof(move) != 'undefined') {
interpret('(move)');
}
ellipse(target_x, target_y, 10, 10);
x = target_x;
y = target_y;
Expand Down
2 changes: 1 addition & 1 deletion lisp.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ this["and"] = function()
return cond;
};


this["if"] = this["cond"];
this["or"] = function()
{
var ret = NIL;
Expand Down

0 comments on commit 72c43ac

Please sign in to comment.