-
Notifications
You must be signed in to change notification settings - Fork 0
Terminology
Phrogz edited this page Oct 28, 2011
·
5 revisions
THIS PAGE IS OUTDATED BRAINSTORMING; IT HAS NOT YET BEEN UPDATED TO CURRENT THINKING
Because putting Things in CapitalLetters and CamelCase makes them Official.
-
- A
Gameis a contest between n specificPlayers.
- A
-
- A
Gamehas a currentState.
- A
-
- The
GameServerknows about many differentGameTypes.
- The
-
- A
GameTypehas a nice name.
- A
- A
GameTypehas a unique identifier (string, for identifying). - A
GameTypespecifies how many players are allowed in aGame. - A
GameTypeknows how to serialize theStateof aGame.- The
Stateof aGameincludes not only things like board state, but also score and stats.
- The
- A
GameTypeknows how to serialize the PublicStateof aGame.-
- This is the subset of
Stateinformation sent toPlayers.
- This is the subset of
-
- A
GameTypeknows how to determine whichPlayergets the nextMovein aGame.-
- Some games/rules might have a player skip a turn.
-
- A
GameTypeknows how to deserialize aMove. - A
GameTypeknows how to validate aMovefor legality. - A
GameTypeknows how to mutate theStateof aGamebased on aMove. - A
GameTypeknows how to determine if aGameis finished. - A
GameTypeknows how to provide a final Score for eachPlayerin aGame.
- The
GameServerkeeps track of multiple concurrent Games. - The
GameServeris responsible for storing and retrievingGameStates.- A
Playershould be able to break the connection to the server and then rejoin an existing game.
- A
- The
GameServeraccepts aTurnfrom aPlayer. - The
GameServeris responsible for communicating betweenPlayers and aGameTypeabout aGame.- Or more likely, a
GameTypeis a class and aGameis an instance of that class, and so communication is made directly with a game instance.
- Or more likely, a
- A
Turncombines aGameMovewithGameandPlayeridentifiers. - The
GameServeris responsible for verifying that aTurnmade by aPlayerwas actually sent by thatPlayer, and thePlayeris part of the describedGame. - The
GameServeris responsible for feedingMoves byPlayers to theGameTypein the order it requests them.
- The
GameServeris eventually responsible for clearing out old games. - The
GameServerkeeps track of player and game statistics.
- The client API knows how to talk to the
GameServerfor aPlayer.- (e.g. communicating with whatever unique identifiers and security are required for verification)
- The client API facilitates in parsing
GameServerresponses (e.g. raising errors based on JSON). - The client API helps set up a
Game(e.g. callbacks for when the game is on, when its your turn, asking for the game state)