evolution
Sequence Diagram newGame
Note1- text The player clicked
on new game.
Note2- text Create a new square of land
with coordinates (x, y) where
0 <= x < gameBoardWidth and
0 <= y < gameBoardHeight.
Each new square will have a
random landType chosen from
the landTypes specified in the
property file of lands.
For each new square explored
is false except for one square in
the middle of the gameboard.
Note3- text All the property files needed to initilize
the other knowledgecatalogs are listed
in the property file named resourceFile
or have the default values actions.prop,
constructions.prop, lands.prop and
recourses.prop.
to Class gui.UserInterface
to Object - Name
- Number 1.1
- Operation createWorldController
to Object worldController
- Name worldController := create(resourceFile, gameBoardWidth, gameBoardHeight)
- Number 1.1.1
to Object
- Number 1.2
- Operation initGameBoard
to Object gameBoard
- Name create(worldController)
- Number 1.2.1
Activation1
Activation17
Activation2
- Stereotype singleton
to Class evolution.Evolution
Activation7
to Class evolution.GameBoard
to Object sq- Name create(x, y, explored)
- Number 1.1.1.1.4.1
Activation8
- Stereotype singleton
to Class evolution.EvolutionKnowledgeCatalog
to Object - Number 1.1.1.1.3.1
- Operation initialize
- Arguments actionsFile
to Object
- Number 1.1.1.1.3.2
- Operation initialize
- Arguments landsFile
to Object
- Number 1.1.1.1.3.3
- Operation initialize
- Arguments recourcesFile
to Object
- Number 1.1.1.1.3.4
- Operation initialize
- Arguments constructionsFile
to Note Note3
Activation9
- Stereotype singleton
to Class evolution.actions.ActionKnowledgeCatalog
Activation10
- Stereotype singleton
to Class evolution.constructions.ConstructionKnowledgeCatalog
Activation13
- Stereotype singleton
to Class evolution.resources.ResourceKnowledgeCatalog
Activation12
- Stereotype singleton
to Class evolution.lands.LandKnowledgeCatalog
Activation11
- Stereotype singleton
to Class evolution.lands.LandKnowledgeCatalog
Activation15
- Stereotype singleton
to Class evolution.events.EventManager
Activation16
- Stereotype singleton
to Class evolution.events.EventManager
Activation19
gameBoard
to Class gui.GameBoard
to Object - Name
- Number 1.2.1.1
- Operation subscribe
- Arguments gameBoard, SquareChangedEvt.class
Activation18
Player- Stereotype actor
to Object - Name
- Number 1
- Operation newGameActionPerformed
to Note Note1
sq- Stereotype collection
to Class evolution.lands.SquareOfLand
to Object - Number 1.1.1.1.4.1.1
- Operation generateLandResources
- Arguments landType
- Return landResources
to Object
- Number 1.1.1.1.4.1.2
- Operation signalEvent
- Arguments new SquareChangedEvt(sq)
to Note Note2
Activation14
world- Stereotype singleton
to Class evolution.World
to Object world- Number 1.1.1.1.1
- Operation setWorldController
- Arguments worldController
to Object
- Number 1.1.1.1.2
- Operation initialize
to Object
- Number 1.1.1.1.4
- Operation create
- Arguments gameBoardWidth, gameBoardHeight
- Return gameBoard
to Object
- Number 1.1.1.1.3
- Operation initialize
- Arguments resourceFile
Activation4
Activation6
worldController
to Class evolution.WorldController
to Object world- Name world := create(worldController, resourceFile, gameBoardWidth, gameBoardHeight)
- Number 1.1.1.1
to Object worldController
- Number 1.1.1.2
- Operation initState
Activation3
Activation5