reset password
Author Message
kirtitiwari
Posts: 5
Posted 20:04 May 07, 2014 |

Hi,

I have some question about hw 4 requirement--

I. As according hw 3 ,when a user plays against AI player, the user can save the game and resume it later.-- 

ii. We need to store game data  in database ?

iii. how to resume a game ?

iii.. If user click on New Game without concluding the current game result it should be store in database ? (ONGOING, WIN ,LOSS).

 

 

Thanks

Kirti

 

rmhatre
Posts: 4
Posted 21:25 May 07, 2014 |

What consitutes game data ???

user , startTime , endTime , board , winner ????

cysun
Posts: 2935
Posted 21:59 May 07, 2014 |

I think I should clarify the difference between "store game data in database" and "save/resume game".

Your application should have the capability to store game data (players of the game, start/end time, game states, outcome etc.) in a database. This capability allows you to implement higher-level features such as game history, win/loss statistics, save/resume games, and so on.

If you have played video games before, you may have noticed that most videos games allow players to save their progress and come back later to continue from where they left off. This is what I called the "save/resume game" feature. This feature will be a requirement in HW5, but you do not need to implement it in HW4.

In HW4 it's up to you to decide when to save game data to database. For example, you can save the game to database after each move, or only save it after the game ends.

As for your other questions:

Resuming a game can be implemented easily by loading the saved game states from database.

As stated in HW3, if a user clicks New Game before finishing the current game, it's considered a loss for the user; the current game is considered finished and the game data should be saved in the database.

cysun
Posts: 2935
Posted 22:01 May 07, 2014 |
rmhatre wrote:

What consitutes game data ???

user , startTime , endTime , board , winner ????

It's specified in HW3: "For each game, the application must keep track of ...". You need to save the board too in order to implement the "save/resume game" feature later.

deep.amrutiya
Posts: 5
Posted 01:48 May 08, 2014 |

Currently we are saving game id, player id, start time, end time, win/loss/tie for the completed game against AI. Do we need to save the game board for the games that are completed against AI for this homework?

cysun
Posts: 2935
Posted 08:01 May 08, 2014 |
deep.amrutiya wrote:

Currently we are saving game id, player id, start time, end time, win/loss/tie for the completed game against AI. Do we need to save the game board for the games that are completed against AI for this homework?

It's up to you.