Dynamically retrofitting legacy JavaScript classes as Backbone models

The code.

When I originally wrote my Jeopardy Scorekeeper single-page app with just JavaScript and jQuery, I wrote what are essentially model classes that implement the game and player logic (keeping score, tracking remaining clues, rotating players, etc.) and that have no user interface functionality, other than the abstract concept of the Jeopardy UI (the board, etc.). I decided to try refactoring the Jeopardy Scorekeeper with Backbone, but I also wanted to:

Continue reading