any help mastah ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

any help mastah ?

Please help me Mastah ... I want to make the appearance of the output button when clicked will repeat a game again ... but I don't know how! HTML Program.

9th Aug 2018, 10:44 PM
Imade Andika Suwartama
Imade Andika Suwartama - avatar
4 Answers
+ 3
You create new gameArea when the document is loaded. You should create it in the start function so when you call it the canvas gets reset. Clear the interval and obstacle array. You should have a start or init function that you call when you want to start/restart the game. It should clear the game values and reset to default. Take a look at this. https://code.sololearn.com/WftFhf1E9UQI/?ref=app You can see the huge messy init function which is called twice. When the page loads and when you collapse.
9th Aug 2018, 11:36 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
make a hover page with button
9th Aug 2018, 11:17 PM
DaVenture
0
ty sir Daventure
9th Aug 2018, 11:27 PM
Imade Andika Suwartama
Imade Andika Suwartama - avatar
0
oky. Ty Sir Toni Isotalo
10th Aug 2018, 12:00 AM
Imade Andika Suwartama
Imade Andika Suwartama - avatar