mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-27 09:58:44 +01:00
refactoring gone wrong (pulled too early)
This commit is contained in:
parent
d34666810a
commit
0534ab04a2
1 changed files with 5 additions and 5 deletions
|
@ -266,7 +266,7 @@ function initialize_a_star( dom_container ) {
|
||||||
|
|
||||||
if ( won_or_not( ) ) {
|
if ( won_or_not( ) ) {
|
||||||
if ( state.level < levels.length - 1 ) {
|
if ( state.level < levels.length - 1 ) {
|
||||||
state = load_level( levels, state.level + 1 );
|
state = load_level( state.level + 1 );
|
||||||
display_level( );
|
display_level( );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -295,18 +295,18 @@ function initialize_a_star( dom_container ) {
|
||||||
break;
|
break;
|
||||||
case 78: // n
|
case 78: // n
|
||||||
if ( state.level < levels.length - 1 ) {
|
if ( state.level < levels.length - 1 ) {
|
||||||
state = load_level( levels, state.level + 1 );
|
state = load_level( state.level + 1 );
|
||||||
display_level( );
|
display_level( );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 80: // p
|
case 80: // p
|
||||||
if ( state.level > 0 ) {
|
if ( state.level > 0 ) {
|
||||||
state = load_level( levels, state.level - 1 );
|
state = load_level( state.level - 1 );
|
||||||
display_level( );
|
display_level( );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 82: // r
|
case 82: // r
|
||||||
state = load_level( levels, state.level );
|
state = load_level( state.level );
|
||||||
display_level( );
|
display_level( );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -315,7 +315,7 @@ function initialize_a_star( dom_container ) {
|
||||||
|
|
||||||
if ( won_or_not( ) ) {
|
if ( won_or_not( ) ) {
|
||||||
if ( state.level < levels.length - 1 ) {
|
if ( state.level < levels.length - 1 ) {
|
||||||
state = load_level( levels, state.level + 1 );
|
state = load_level( state.level + 1 );
|
||||||
display_level( );
|
display_level( );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue