From b0651c326160532c68f00774fc518201a86e270a Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 6 Jul 2011 13:46:01 +0200 Subject: [PATCH] same, moves -> distance_travelled --- star.js/js/star.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/star.js/js/star.js b/star.js/js/star.js index 78c8692..078e4f4 100644 --- a/star.js/js/star.js +++ b/star.js/js/star.js @@ -26,7 +26,7 @@ var options = { }; var state = { moving : cell.BALL, - moves : 0, + distance_travelled : 0, level : 0, board : "" }; @@ -126,7 +126,7 @@ function format_level( state ) { function load_level( levelset, nb ) { state.level = nb; state.board = levelset[ state.level ]; - state.moves = 0; + state.distance_travelled = 0; state.moving = cell.BALL; return state; } @@ -174,9 +174,9 @@ function make_a_move( state, where ) { item_coord[ 1 ] += motion[ 1 ]; /* to those of target cells */ state = set_cell( state, item_coord[ 0 ], item_coord[ 1 ], state.moving ); /* move actor into target cell */ - } - state.moves++; /* increment moves' counter */ + state.distance_travelled++; /* increment distance_travelled */ + } return state; }