diff --git a/Designphase/Klassendiagramme.md b/Designphase/Klassendiagramme.md index 725c273..6cfaa6d 100644 --- a/Designphase/Klassendiagramme.md +++ b/Designphase/Klassendiagramme.md @@ -8,6 +8,7 @@ Hier werden Klassendiagramme veröffentlicht * [ClassChart_V1.5](../uploads/Designphase/Klassendiagramme/ClassChart_V1.5.svg) * [ClassChart_V2.0](../uploads/Designphase/Klassendiagramme/ClassChart_V2.0.svg) * [ClassChart_V2.1](../uploads/Designphase/Klassendiagramme/ClassChart_V2.1.svg) +* [ClassChart_V3.0](../uploads/Designphase/Klassendiagramme/ClassChart_V3.0.svg) --- diff --git a/Designphase/Paketdiagramme.md b/Designphase/Paketdiagramme.md index 386ab7d..28d7dea 100644 --- a/Designphase/Paketdiagramme.md +++ b/Designphase/Paketdiagramme.md @@ -1,4 +1,5 @@ Hier werden die Paketdiagramme veröffenticht * [package_V1.0](../uploads/Designphase/Paketdiagramme/packages_V1.0.svg) -* [package_V1.1](../uploads/Designphase/Paketdiagramme/packages_V1.1.svg) \ No newline at end of file +* [package_V1.1](../uploads/Designphase/Paketdiagramme/packages_V1.1.svg) +* [package_V2.0](../uploads/Designphase/Paketdiagramme/packages_V2.0.svg) \ No newline at end of file diff --git a/uploads/Designphase/Klassendiagramme/ClassChart_V3.0.svg b/uploads/Designphase/Klassendiagramme/ClassChart_V3.0.svg new file mode 100644 index 0000000..d9a46b5 --- /dev/null +++ b/uploads/Designphase/Klassendiagramme/ClassChart_V3.0.svg @@ -0,0 +1,4 @@ + + + +
Game
 -gameBoard: GameBoard 
 -bank: Bank 
 -timer: Timer 
 -deck: EventCard 
 -musicEnabled: boolean 
 -soundEffectEnabled: boolean 
 -eventCards: List<EventCard> 
 -communityCards: List<CommunityCard> 
 -gameState: GameState
+ initializeGame(): void
+ startTurn(player: Player): void
+ endTurn(player: Player): void
+ checkWinCondition(): boolean
+ applyEventCard(card: EventCard): void
+  rollDice(): DiceResult
- state
Player
-name: String
-color: ColorRGBA
-accountBalance: int
-gamePiece: GamePiece
-properties: List<Property>
-getOutOfJailCard: int
-fieldId: int

+move(steps: int): void
+buyProperty(property: Property): void
+payRent(amount: int): void
+declareBankruptcy(): void
<<abstract>>
GameState
InGame
GameOver
Lobby
-player
<<abstract>>
PlayerState
Active
Bankrupt%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22NomalState%22%20style%3D%22swimlane%3BfontStyle%3D0%3BchildLayout%3DstackLayout%3Bhorizontal%3D1%3BstartSize%3D26%3BfillColor%3Dnone%3BhorizontalStack%3D0%3BresizeParent%3D1%3BresizeParentMax%3D0%3BresizeLast%3D0%3Bcollapsible%3D1%3BmarginBottom%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22-240%22%20y%3D%22380%22%20width%3D%22140%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3
Lobby
InJail
-roundsInJail: Int
WaitForTurn
-game
StartScreen
CreateGame
Settings
GameClosed
Dice
+rollDice(): int
GulagField
-bailCost: int
+payBail(player: Player): void
+checkInJail(player: Player): boolean
- properties
TestStreckeField
- money: int
+collectMoney(player: Player): void
EventField
+payBail(player: Player): void
+checkIfInJail(player: Player): boolean
WacheField
+sendToJail(player: Player): void
FoodField
- factor: int
+applyDiceRollEffect(diceValue: int): void
GateField
-rentLevel: int

+calculateRent(): int
BuildingProperty
-houses: int
-hotel: boolean
+buildHouse(p: Player): void
+buildHotel(p: Player): void
TradeHandler
-offeredProperties: List<Property>
-offerMoney: int
-offerCards: List<Card>
+initiateTrade(trader: Player, tradee: Player): void
+offerProperty(property: Property): void
+offerMoney(amount: int): void
+finalizeTrade(): boolean
fields
monopoly

<<abstract>>
Field


- name: String

- id: int


+ accept(v: FieldVisitor, p: Player, g: Game)

PlayerHandler
- playerHandler
- players
2**6
GameBoard
~ fieldAt(id: int)
~ fieldId(f: Field)
messages
model
<<abstract>>
ClientMessage
+ accept(ServerInterpreter, int): void
<<abstract>>
ServerMessage
+ accept(ClientInterpreter, int): void
ConnectRequest
DisconnectRequest
PlayerReady
RollDice
BuyPropertyRequest
EndTurn
TradeOffer
TradeOffer
TradeResponse
ViewAssetsRequest
ConnectionResponse
PlayerDisconnected
GameEnd
DiceResult
MoveResult
BuyPropertyResponse
PayRent
UpdatePlayerAssets
NextPlayerTurn
JailEvent
GameEnd
GameStart
GameOver
PlayerStatusUpdate
TimeOutWarning
EventDrawCard
TradeRequest
ViewAssetsResponse
SoundTrigger
DeckHelper
- communityCards: Queue<CommunityCards>
- eventCards: Queue<EventCards>
- shuffle(List<Cards>): void
+ drawEventCard(): EventCard
+ drawCommunityCard(): CommunityCard
<<abstract>>
Card
- description: String
+ accept(v: CardVisitor, p: Player, g: Game): void
~ getDescription(): String
EventCard
CommunityCard
card
<<interface>>
CardVisitor
+ visit(c: Card, p: Player, g: Game)
<<interface>>
FieldVisitor
+ visit(f: FoodField, p: Player, g: Game)
+ visit(f: BuildingField, p: Player, g: Game)
+ visit(f: GateField, p: Player, g: Game)
+ visit(f: GulagField, p: Player, g: Game)
+ visit(f: EventField, p: Player, g: Game)
+ visit(f: TestStreckeField, p: Player, g: Game)
+ visit(f: WacheField, p: Player, g: Game)
<<abstract>>
PropertyField
- price: int
- rent: int
- owner: Player
- mortaged: boolean
~ setOwner(p: Player): void
- visual
Player
-name: String
-color: ColorRGBA
-accountBalance: int
-gamePiece: GamePiece
-properties: List<Property>
-getOutOfJailCard: int
-fieldId: int

+move(steps: int): void
+buyProperty(property: Property): void
+payRent(amount: int): void
+declareBankruptcy(): void

<<interface>>
ClientInterpreter


+ received(ShootMessage, int): void
+ received(MapMessage, int): void
+ received(AnimationFinishedMessage, int): void

<<interface>>
ServerInterpreter


+ received(GameDetails): void
+ received(StartBattleMessage): void
+ received(EffectMessage): void

MonopolyApp


- MonopolyApp():


- escape(boolean): void
+ main(String[]): void
- makeServerConnection(): ServerConnection
+ simpleInitApp(): void
+ receivedEvent(InfoTextEvent): void
- close(): void
- makeSettings(): AppSettings
+ stop(boolean): void
~ confirmDialog(String, Runnable): void
+ closeApp(): void
+ simpleUpdate(float): void
+ requestClose(boolean): void
~ errorDialog(String): void
- attachGameSound(): void
- setupInput(): void
- setupStates(): void
- attachGameMusic(): void
+ receivedEvent(ClientStateEvent): void
- setupGui(): void


config: MonopolyAppConfig
dialogManager: DialogManager
infoText: String
executor: ExecutorService
gameLogic: ClientGameLogic
draw: Draw

MonopolyAppConfig


+ MonopolyAppConfig():


+ useGammaCorrection(): boolean
- makeColorRGBA(String): ColorRGBA
# convertToType(String, Class<?>): Object
+ fullScreen(): boolean
+ useRetinaFrameBuffer(): boolean


showStatistics: boolean
topColor: ColorRGBA
resolutionWidth: int
resolutionHeight: int
showSettings: boolean

MonopolyAppState


# MonopolyAppState():


+ showsDialog(): boolean
# enableState(): void
+ initialize(AppStateManager, Application): void
# disableState(): void


gameLogic: ClientGameLogic
enabled: boolean
app:MonopolyApp

<<interface>>
FileAction


+ run(File): void

GameMusic


+ GameMusic():


+ volumeInPreferences(): float
- loadSound(Application, String): AudioNode
+ initialize(AppStateManager, Application): void
+ enabledInPreferences(): boolean
+ toggleSound(): void


enabled: boolean
volume: float

GameSound


+ GameSound():


+ initialize(AppStateManager, Application): void
+ toggleSound(): void
+ enabledInPreferences(): boolean
- loadSound(Application, String): AudioNode
+ passGo(): void
+ cardEvent(): void

+ goJail(): void

+ rollDice(): void

+ earnMoney(): void

+ looseMoney(): void

+ acceptOffer(): void

+ refuseOffer(): void

+ winnerSound(): void

+ looserSound(): void

+ buttonSound(): void

+ receivedEvent(SoundEvent): void


enabled: boolean

MapView


~ MapView(GameBoard, MonopolyApp):


- setupBackground(): void
+ mouseToModel(Vector2f): IntPoint
+ addGrid(): void
- gridLine(Position, Position): Geometry
~ unregister(): void
+ modelToView(float, float): Position
+ viewToModel(float, float): IntPoint


height: float
width: float
app: MonopolyApp
node: Node
map: MonopolyMap

MapViewSynchronizer


+ MapViewSynchronizer(MapView):


+ visit(Pawn): Spatial
+ visit(House): Spatial
+ visit(Hotel): Spatial

Menu


+ Menu(MonopolyApp):


- handle(FileAction, TextInputDialog): void
- fileDialog(FileAction, String): void
+ update(): void
- saveDialog(): void
- loadDialog(): void
+ update(float): void
+ escape(): void

NetworkDialog


~ NetworkDialog(NetworkSupport):


- connect(): void
- startServerInThread(): void
+ update(float): void
- initNetwork(): Object
- success(): void
- failure(Throwable): void
- openProgressDialog(): void

NetworkSupport


+ NetworkSupport(MonopolyApp):


+ send(ClientMessage): void
~ initNetwork(String, int): void
+ clientDisconnected(Client, DisconnectInfo): void
+ disconnect(): void
+ messageReceived(Client, Message): void
+ clientConnected(Client): void
+ connect(): void


connected: boolean
app: MonopolyApp

ParticleEffectFactory


~ ParticleEffectFactory(MonopolyApp):


~ createSmokeEmitter(): ParticleEmitter
+ createConfetti(): ParticleEmitter

GameBoardSynchronizer


+ SeaSynchronizer(MonopolyApp, Node, GameBoard):


- removePawn(Pawn): void
+ visit(Pawn): Spatial
- createBox(Pawn): Spatial
+ visit(House): Spatial
+ visit(Hotel): Spatial
- createPawn(Pawn): Spatial
- createHouse(House): Spatial
- createColoredMaterial(ColorRGBA): Material
- createHotel(Hotel): Spatial
- calculateRotationAngle(Rotation): float

HouseControl


+ HouseControl(House, Node):


# controlRender(RenderManager, ViewPort): void
# controlUpdate(float): void

PawnControl


+ PawnControl(Pawn, Node):


# controlRender(RenderManager, ViewPort): void
# controlUpdate(float): void

VolumeSlider


+ VolumeSlider(GameMusic):


+ update(): void

gui

MainSynchronizer


# GameBoardSynchronizer(GameBoard, Node):


# addExisting(): void
+ receivedEvent(ItemRemovedEvent): void
+ receivedEvent(ItemAddedEvent): void
# translate(Item): Spatial

client
MainMenu
+showMenu(): void
+hideMenu(): void
NewGameMenu
+createNewGame(): void
+cancel(): void
SettingMenu
+loadSettings(): void
+saveSettings(): void
+adjustVolume(level: int): void
Trading
+initiateTrade(): void
+confirmTrade(): void
+cancelTrade(): void
PropertyAdmin
+manageProperty(): void
+upgradeProperty(): void
+mortgageProperty(): void

MonopolyServer


+ run(): void
+ messageReceived(HostedConnection, Message): void
+ send(int, ServerMessage): void
- registerListeners(): void
+ main(String[]): void
+ connectionRemoved(Server, HostedConnection): void
- startServer(): void
+ connectionAdded(Server, HostedConnection): void
- exit(int): void
- processNextMessage(): void
- initializeSerializables(): void

<<record>>
ReceivedMessage


~ ReceivedMessage(ClientMessage, int):


~ process(ClientInterpreter): void
+ message(): ClientMessage
+ from(): int

server
<<interface>>
VisualVisitor<T>
+ visit(house :House): T
+ visit(playerFigure :PlayerFigure): T
+ visit(hotel: Hotel): T

Pawn


- rotation: Rotation
- status: Status
- position: Vector3f


+ accept(VisualVisitor): void
+ contains(IntPosition): boolean
+ toString(): String
+ moveTo(IntPosition): void
+ moveTo(int, int): void
+ rotated(): void
+ accept(Visitor<T>): T
+ contains(int, int): boolean

- updateRotation(Vector3f, Vector3f): void

IntPoint


+ IntPoint(int, int):
- IntPoint():


+ toString(): String
+ equals(Object): boolean
+ hashCode(): int


y: int
x: int

<<interface>>
IntPosition


y: int
x: int

<<interface>>
Item


+ accept(VoidVisitor): void
+ accept(Visitor<T>): T

Hotel


- rotation: Rotation
- status: Status
- position: Vector3f


+ accept(VisualVisitor): void
+ contains(IntPosition): boolean
+ toString(): String
+ moveTo(IntPosition): void
+ moveTo(int, int): void
+ rotated(): void
+ accept(Visitor<T>): T
+ contains(int, int): boolean

- updateRotation(Vector3f, Vector3f): void

House


- rotation: Rotation
- status: Status
- position: Vector3f


+ accept(VisualVisitor): void
+ contains(IntPosition): boolean
+ toString(): String
+ moveTo(IntPosition): void
+ moveTo(int, int): void
+ rotated(): void
+ accept(Visitor<T>): T
+ contains(int, int): boolean

- updateRotation(Vector3f, Vector3f): void

<<enumeration>>
Rotation


- Rotation():


+ dx(): int
+ rotate(): Rotation
+ values(): Rotation[]
+ dy(): int
+ valueOf(String): Rotation

<<record>>
ClientStateEvent


+ ClientStateEvent():


+ notifyListener(GameEventListener): void

<<interface>>
GameEvent


+ notifyListener(GameEventListener): void

<<interface>>
GameEventBroker


+ notifyListeners(GameEvent): void

<<interface>>
GameEventListener


+ receivedEvent(ClientStateEvent): void
+ receivedEvent(ItemRemovedEvent): void
+ receivedEvent(SoundEvent): void
+ receivedEvent(InfoTextEvent): void
+ receivedEvent(ItemAddedEvent): void

<<record>>
InfoTextEvent


+ InfoTextEvent(String):


+ notifyListener(GameEventListener): void
+ key(): String

<<record>>
ItemAddedEvent


+ ItemAddedEvent(Item, GameBoard):


+ map(): GameBoard
+ item(): Item
+ notifyListener(GameEventListener): void

<<record>>
ItemRemovedEvent


+ ItemRemovedEvent(Item, GameBoard):


+ item(): Item
+ map(): GameBoard
+ notifyListener(GameEventListener): void

<<enumeration>>
Sound


- Sound():


+ values(): Sound[]
+ valueOf(String): Sound

<<record>>
SoundEvent


+ SoundEvent(Sound):


+ notifyListener(GameEventListener): void
+ sound(): Sound

notification
GoField
frame
\ No newline at end of file diff --git a/uploads/Designphase/Paketdiagramme/packages_V2.0.svg b/uploads/Designphase/Paketdiagramme/packages_V2.0.svg new file mode 100644 index 0000000..c79bf60 --- /dev/null +++ b/uploads/Designphase/Paketdiagramme/packages_V2.0.svg @@ -0,0 +1,4 @@ + + + +
monopoly
model
messages
notification
server
client
gui
card
frame
fields
\ No newline at end of file