Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs

Level 2 to my game.


Dear community,

I have (partly) written a breakout game, the game works fine (apart from some glitches I'll fix later on). But now I want to create a level 2 to my game. Right now when you win it will just run setup(); and your level will just start over.

Now I have created a new file within my repl called: "Script level 2.js" and I'd like to run the code within that file when you win the first level. My question is: Is this possible?

The code to winning the first level looks like this right now:

if (score == brickRowCount * brickColumnCount) {
alert("LEVEL 2");

2 years ago
You are viewing a single comment. View All