After thinking for awhile i think is better to remove the restart status in the end of the games. because my objective of this installation is showcase how can we use web-socket, browser and the mobile device to create something new in technology and interaction.
So i decided to make the game if user lose or win then game will automatically bring the players back to the main screen. if you they will like to play just press start then they are able to play again.
So i create a function to link to another page after 5 seconds when the function is called. For now i linked the page the first pages which is main.htm now.