Please enable JavaScript.
Coggle requires JavaScript to display documents.
GameEngine.h / GameEngine.cpp, MODEL, GameObservers.cpp / GameObservers.h,…
GameEngine.h / GameEngine.cpp
UI Setup (Part 1)
Select a Map from a directory containing Map files.
Select number of players [2-5]
Toggle observers
Load selected map using MapLoader
Create all Player objects
Create a deck of Cards
Assign an empty Hand of Cards to each Player
Game Startup Phase (Part 2)
startupPhase()
Randomly assign all Territories to Players
Give armies to Players
Randomly determine the order of play
Main Game Loop (Part 3)
mainGameLoop()
Reinforcement Phase
reinforcementPhase()
If the player owns all the territories of an entire continent, the player is given a number of armies corresponding to the continent's control bonus value
Give each player floor(# territories owned/3) armies
Order Issuing Phase
issueOrdersPhase()
Player.cpp / Player.h
issueOrder()
Player issues Deploy orders to add all armies on all Territories to defend
As long as the player still has armies in the reinforcement pool
Issue all necessary Advance orders
Owned --> Owned: Defend
Owned --> Enemy: Attack
Issue any other Orders using Cards
Player chooses which Territories to attack and which to defend
toDefend()
toAttack()
Orders Execution Phase
Sort list of Orders by priorities (attribute of each Order)
Pop Orders from list and call execute()
Store result of executing this Order in a string (attribute of the Order)
CONTROLLER
MODEL
Orders.cpp / Orders.h
Orders Implementation (Part 4)
execute()
Advance: 4
Airlift: 2
Bomb: 4
Blockade: 3
Negotiate: 4
Deploy: 1
GameObservers.cpp / GameObservers.h
Observers (Part 5)
Phase Observer
View that displays information happening in the current phase
Header showing player and phase
Information about current phase (see part 3)
Game Statistics Observer
View that displays info about the game
Shows some kind of graph or table about "Player world domination"
VIEW
C++ A2 Diagram
Runs until all territories is controlled by one player (win condition)
Round-Robin Process
Round-Robin Process
All deploy orders will be placed first
Using Observer Design Pattern
Pure virtual method, each subclass of Orders implements its own
Must be dynamic (refer to driver instructions)
Seems like we have a lot of creative freedom here
By algorithm
Random card in their Hand
Minimum 3
in Continent class - pCTroops