andye456 / RandomRooms

0 stars 0 forks source link

When the matrix is refreshed then only the table element containing the matrix should be refreshed with the new matrix #14

Closed andye456 closed 4 years ago

andye456 commented 4 years ago

Currently the whole page is refreshed when the "Start" button is pressed. This is flawed as the game state is lost when the page is refreshed. 1) Split the generate html into a page layout and a maze generation. 2) The maze generation is appended to the div in the table row that contains the maze. 3) The level and character state is maintained.

andye456 commented 4 years ago

Solved: RoomGenHtml.py split into 2 functions 1 to generate the HTML page and 2 to generate the maze table. The maze is added to a div in the rest of the HTML using an ajax call - actually a jquery .load(). When the exit is reached the maze is recreated and added to the div, the rest of the page is the same and the level info is maintained.