refactored big code reuse GamePage.html