Architecture

The GOT Judge will be built using the Struts web application framework, tied to a MySQL database via a Torque-based persistence layer.

Use Cases

The use cases for GOT can be broken into those internal to the game, and 'game shell' use cases. In further development of this design, these use cases should be expanded to indicate entry conditions, exit effects, agents, etc.

Game Shell Use Cases

Game Use Cases

Game States

Each game in progress on the server will exist in one of the following states:
Note - * indicates that the state requires a particular House or Houses to act, if * is absent, then all Houses must act.

State nameActions for that stateUse Case Allowed
westeros resolve supply * Any house which has armies that exceed their newly calculated supply limits eliminates units Disband Unit
westeros muster * Every house (in turn order) places their newly mustered units Muster Unit
westeros clash of kings iron throne All houses simultaneously bid Bid
westeros clash of kings iron throne resolve ties * The current holder of the iron crown token resolves ties in the bidding Resolve Ties
westeros clash of kings fiefdoms All houses simultaneously bid Bid
westeros clash of kings fiefdoms resolve ties * The current holder of the iron crown token resolves ties in the bidding Resolve Ties
westeros clash of kings kings court All houses simultaneously bid Bid
westeros clash of kings kings court resolve ties * The current holder of the iron crown token resolves ties in the bidding Resolve Ties
westeros wildling attack bidding All houses simultaneously bid Bid
westeros wildling attack victory resolve ties If victorious but tied for high bidder, the current holder of the iron crown token resolves ties in the bidding Resolve Ties
westeros wildling attack victory If victorious, high bidder gets a card back Recover House Card
westeros wildling attack defeat resolve ties If defeated but tied for low bidder, the current holder of the iron crown token resolves ties in the bidding Resolve Ties
westeros wildling attack defeat If defeated, low bidder loses 4 units, all others lose 2 units Disband Unit
planning assign orders All houses get orders in Assign Order
planning messenger raven * Holder of messenger raven may change order Change Order
action resolve raid orders * In turn order, houses resolve raids Resolve Raid
action resolve march orders * In turn order, houses resolve marches March
action resolve march orders battle declare support * All supporting units adjacent to a current battle choose one side or neither Declare Support
action resolve march orders battle select house cards * Battle participants select their card Select House Card
action resolve march orders battle declare blade * If a participant holds the valyrian steel blade Use Blade
action resolve march orders aftermath declare casualties * If casualties, select which units -- if all units identical, judge can do it for player Disband Units
action resolve march orders aftermath retreat * If survivors, choose retreat location Retreat
action resolve march orders aftermath resolve card effects * If house card has special effect, allow user to select target Card Effect *

Data Model

Tables

Table NameDescription
Area Static data which describes each area on the map. Includes name, terrain power, supply and muster.
Adjacency Static data which describes which area on the map are adjacent. Consists of a number of tuples of area ids.
Game Dynamic state of a game. Consists of turn, wildling track position, and game state. All other data about the game is contained in other objects that reference the game by game_id foreign key.
NeutralForce Dynamic state of a neutral force (e.g. Eyrie, King's Landing, or Greyjoy in a 4 player game). Consists of game_id, area_id, strength and name.
WesterosCardStatic Static data describing the cards that make up the game decks I, II and III. Consists of name, text, wildling advance, and deck number. Note that multiple instances of the same card in a deck will result in multiple records.
WesterosCard Dynamic state of a westeros card in the game. Contains game_id, deck position and a flag to indicate if it is visible or not.
HouseCardStatic Static data about a house card. Contains name, which house (by name or id?), strength, # of forts, # of swords, special effect text.
HouseCard Dynamic data about a house card. Contains game_id and a flag to indicate whether or not it has been played.
House Dynamic information about the state of a house. Contains house_id, game_id, player_id, name, power tokens held, iron throne track position, fiefdoms track position, king's court track position.
Unit Dynamic information about a unit in the game. Contains house_id, unit type, area_id, and whether the unit is routed or not.
AreaControl Dynamic information about which house controls which area. Contains house_id and area_id.