Game hall update diary story about scoring Mechanism

Source: Internet
Author: User

After login is sent, you can obtain a list of existing scores for each game of the user from the database. Note that the userscore table in the DB should only contain records of score <> 0, that is, at least once a game is played.

After the game ends, update the score field of the userscore table in the DB. If no record exists, add a new one. The table will not be updated for the draw. (This is an SP named pr_updatescore .)

When the game ends, the score record of the table user in the clienttable of the server is updated.

When the game ends, the server sends a new score to all Hall users of the game.

 

After login ends, the user will response the existing Score list of each game to the client and store it in list <gamescore>. There are two fields: gameid and score.

After,

Joinhall extracts the score of the game corresponding to the hall from the client and adds it to the clienttable. This step is crucial.

Leavehall removes userhallinfo from the clienttable.

When the game ends, the list <gamescore> of the client is updated.

 

* Sometimes the singleordefault method is better than single.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.