mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-25 09:58:50 +01:00
void -> empty, second try
This commit is contained in:
parent
1a206770fe
commit
a9214894a1
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
function initialize_a_star( dom_container, level_index ) {
|
||||
// kinda enums
|
||||
var cell = { WALL: '#', BALL: '@', CUBE: 'H', VOID: ' ', GIFT: 'x' };
|
||||
var cell = { WALL: '#', BALL: '@', CUBE: 'H', EMPTY: ' ', GIFT: 'x' };
|
||||
var direction = { UP: 38, DOWN: 40, LEFT: 37, RIGHT: 39 };
|
||||
|
||||
var assets = {
|
||||
|
@ -224,7 +224,7 @@ function initialize_a_star( dom_container, level_index ) {
|
|||
|| ( state.moving == cell.BALL && ( get_cell( item_coord[ 0 ] + motion[ 0 ], item_coord[ 1 ] + motion[ 1 ] ) == cell.GIFT ) )
|
||||
)
|
||||
{
|
||||
state = set_cell( item_coord[ 0 ], item_coord[ 1 ], cell.EMPTY ); /* void the origin cell */
|
||||
state = set_cell( item_coord[ 0 ], item_coord[ 1 ], cell.EMPTY ); /* empty the origin cell */
|
||||
draw_cell( assets.sprites.empty, item_coord[ 0 ], item_coord[ 1 ] );
|
||||
|
||||
item_coord[ 0 ] += motion[ 0 ]; /* move coordinate */
|
||||
|
|
Loading…
Reference in a new issue