From 8e3b318f6332a8b616d41d2cb47d60132a9c6c6f Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sat, 16 Jul 2011 11:47:34 +0200 Subject: [PATCH] path is an array --- js/star.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/star.js b/js/star.js index afd0825..1b420dc 100644 --- a/js/star.js +++ b/js/star.js @@ -174,7 +174,7 @@ function initialize_a_star( dom_container, level_index ) { default: break; } - var path = { } + item_coord; + var path = [ ] + item_coord; /* Calculating arrival coordinates */ while ( /* Hairy conditions ahead */ /* target cell is within level's boundaries */ @@ -201,6 +201,7 @@ function initialize_a_star( dom_container, level_index ) { } update_infos( ); + alert(path); return path; } @@ -221,7 +222,6 @@ function initialize_a_star( dom_container, level_index ) { // We're inside the board if ( click.x == notmovingpos[0] && click.y == notmovingpos[1] ) { - // state.moving = ( state.moving != cell.BALL ) ? cell.BALL : cell.CUBE; switch_actor( ); } else if ( click.x == movingpos[0] ) { if ( click.y > movingpos[1] ) {