_html: refactor chess table generator
preserve game progress while refreshing