Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Loops
let endPos = 5; var xPos = 0; var enemyPos = 4; var isGameOver = false /*while(!isGameOver) { // <--- While game is not GameOver the loop will continue xPos++; // <-- Position moved up 1 if (xPos >= endPos || xPos == enemyPos){ // If position is equal or greater then End Position or position equals to Enemy position it's gameover isGameOver = true; } } while(xPos < endPos){ //While End position is greater then position the loop continues xPos++; if( xPos == enemyPos){ // If position equals to enemy position loop break break; } }*/ /*while(xPos < endPos){ if (xPos % 2 == 1){ continue; } xPos++; if( xPos == enemyPos){ break; }*/ function movePlayer(){ while(xPos < endPos){ xPos++; if (xPos == enemyPos) { return; } } }
run
|
edit
|
history
|
help
0
говнокод
Just stop thinking about it and go eat
Константа круга
Java - Looping thru Strings
game green
prime consecutive numbers
rr
Jason's Code Challenge
Star wars ep 3. limit
2-D Kinematics with accurate air drag