Open samreid opened 6 years ago
I had this same thought a while back and tried it in Area Builder, please see the file QuizGameModel.js
. It was an attempt to do - I think - exactly what you're describing here, i.e. extract the logic for the basic flow of the game into a reusable object or set of objects. In the end, I found what I'd implemented a little awkward because there was some sim-specific logic that needed to be hooked up somehow, and I did that, and it worked, but I didn't feel like it worked well enough that I wanted to move it into the vegas repo. Please take a look and, if you think it would be worth the effort, we could potentially use this as a starting point and go from there. It does seem like it would be a cost savings if there was a grab-and-go object for this that wasn't too hard to use.
@samreid is there something I should do here? It's the last blocking common non-a11y issue for area-model.
At some point we should move code like this and supporting logic into vegas. That will help us develop new games, factor out code from other games and will simplify PhET-iO development and API. It's really up to Ariel when we do that.
@samreid I agree we should do this at some point. @jbphet next sim after EFAC is quite likely to be a new math sim....and math sims often seem to have games. I am going to mark this as deferred and perhaps we can consider this improvement with our next sim with a game.
Marked as deferred but assigned to @jbphet to be revisited when we look at next math sim.
From https://github.com/phetsims/area-model-common/issues/99
I've seen several games that use these states, should this or corresponding logic be factored out? I'll run this past @jbphet first, since he has familiarity with vegas and some games.