sketch.js
// Toggle the state of the simulation
Toggle the state of the simulation
Toggle the state of the simulation
function toggleState() {
  if(gameMode < 3){
	  gameMode++;
  }
  else{
	  gameMode = 0;
  }
  if (gameMode == 0) {
    gamesButton.html('Gamemode: User controlled');
  } else if(gameMode == 1){
    gamesButton.html('Gamemode: Single game shown');
  } else if(gameMode == 2){
	gamesButton.html('Gamemode: 49 games shown');
  } else if(gameMode == 3){
	gamesButton.html('Gamemode: No games shown');
  } else if(gameMode == 4){
	gamesButton.html('Gamemode: Odds based');
  }
}
function toggleState ( ) { if ( gameMode < 3 ) { gameMode ++ ; } else { gameMode = 0 ; } if ( gameMode == 0 ) { gamesButton . html ( 'Gamemode: User controlled' ) ; } else if ( gameMode == 1 ) { gamesButton . html ( 'Gamemode: Single game shown' ) ; } else if ( gameMode == 2 ) { gamesButton . html ( 'Gamemode: 49 games shown' ) ; } else if ( gameMode == 3 ) { gamesButton . html ( 'Gamemode: No games shown' ) ; } else if ( gameMode == 4 ) { gamesButton . html ( 'Gamemode: Odds based' ) ; } }
Toggle the state of the simulation
Toggle the state of the simulation
// Show the best ball // Go train some more