Closed davidjha closed 4 years ago
I was able to convert the self.values
from the state into a json object and insert that into the mysql database. I have not done this with the action histories, or the scoring information. So my database schema has one table. The columns are gameid (auto incrementing int), and a sql json object that contains the entire history of a game.
I have split the tasks up a bit more since you do have some stuff done for this issue but could not represent that before. I also edited the description to not talk about score histories since that would be included with the state and is redundant to bring up.
I see that we have state_histories, action_histories, and state_action_histories. Do we need all three of these?
Oh no. It was just that originally there was a list for state_histories and action_histories and none for state_action_histories even though that was the one we needed. I was wondering if it did not work for some reason and saw that it did work when I added it but I was afraid to just delete the other two that existed before I touched it.
Save_game() can now save states, actions, and score history into the database as a MySQL json format.
Description
Implement save_game() so that state and action can be saved into a SQL database
Tasks