diff --git a/Designphase/Klassendiagramme.md b/Designphase/Klassendiagramme.md index 707e042..900db95 100644 --- a/Designphase/Klassendiagramme.md +++ b/Designphase/Klassendiagramme.md @@ -6,4 +6,5 @@ Hier werden Klassendiagramme veröffentlicht * [ClassChart_V1.3](../uploads/Designphase/Klassendiagramme/ClassChart_V1.3.svg) * [ClassChart_V1.4](../uploads/Designphase/Klassendiagramme/ClassChart_V1.4.svg) * [ClassChart_V1.5](../uploads/Designphase/Klassendiagramme/ClassChart_V1.5.svg) -* [ClassChart_V2.0](../uploads/Designphase/Klassendiagramme/ClassChart_V2.0.svg) \ No newline at end of file +* [ClassChart_V2.0](../uploads/Designphase/Klassendiagramme/ClassChart_V2.0.svg) +* [ClassChart_V2.1](../uploads/Designphase/Klassendiagramme/ClassChart_V2.1.svg) \ No newline at end of file diff --git a/uploads/Designphase/Klassendiagramme/ClassChart_V2.1.svg b/uploads/Designphase/Klassendiagramme/ClassChart_V2.1.svg new file mode 100644 index 0000000..a0cc433 --- /dev/null +++ b/uploads/Designphase/Klassendiagramme/ClassChart_V2.1.svg @@ -0,0 +1,4 @@ + + + +

Pawn


- Monopoly():
+ Monopoly(int, Rotation):


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


minY: int
y: int
destroyed: boolean
minX: int
damaged: Set<IntPoint>
maxX: int
length: int
rotation: Rotation
maxY: int
status: Status
rot: Rotation
x: int

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>>
MonopolyClient


+ enqueue(Runnable): void


config: MonopolyClientConfig
gameLogic: ClientGameLogic

MonopolyConfig


+ MonopolyConfig():


port: int
shipNums: Map<Integer, Integer>
mapWidth: int
mapHeight: int

MonopolyServer


~ 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

ClientGameLogic


+ ClientGameLogic(ClientSender):


+ received(GameDetails): void
+ received(StartMessage): void
+ playSound(Sound): void
+ rotatePawn(): void
+ addListener(GameEventListener): void
+ received(EffectMessage): void
~ initializeBoard(GameDetails): void
+ removeListener(GameEventListener): void
+ movePreview(IntPoint): void
+ mayLoadMap(): boolean
+ saveMap(File): void
~ send(ClientMessage): void
+ notifyListeners(GameEvent): void
+ update(float): void


infoText: String
board: GameBoard
state: ClientState
details: GameDetails

<<interface>>
ClientInterpreter


+ received(ClientMessage, int): void

ClientMessage


# ClientMessage():


+ accept(ClientInterpreter, int): void

<<interface>>
ClientSender


+ send(ClientMessage): void

ClientState


~ ClientState(ClientGameLogic):



~ receivedGameDetails(GameDetails): void
~ mapFinished(): void
~ receivedStartGame(StartGameMessage): void
~ entry(): void
~ movePreview(IntPoint): void
~ update(float): void
~ movingPawn(): boolean



name: String

<<record>>
ClientStateEvent


+ ClientStateEvent():


+ notifyListener(GameEventListener): void

<<interface>>
FileAction


+ run(File): 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

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

<<record>>
InfoTextEvent


+ InfoTextEvent(String):


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

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

<<record>>
ItemAddedEvent


+ ItemAddedEvent(Item, GameBoard):


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

<<record>>
ItemRemovedEvent


+ ItemRemovedEvent(Item, GameBoard):


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

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):


~ createMovingSmokeEmitter(): ParticleEmitter
+ createWaterSplash(): ParticleEmitter

- state

Player


~ Player(int, String, MonopolyConfig):


+ toString(): String


id: int

<<record>>
ReceivedMessage


~ ReceivedMessage(ClientMessage, int):


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

Resources


- Resources():


+ lookup(String): String

<<enumeration>>
Rotation


- Rotation():


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

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

<<interface>>
ServerConnection


+ connect(): void
+ disconnect(): void


connected: boolean

-cards
- playerHandler

ServerGameLogic


+ ServerGameLogic(ServerSender, MonopolyConfig):

~ playerReady(Player): void
~ send(Player, ServerMessage): void
+ addPlayer(int): Player
+ getPlayerById(int): Player
+ received(ShootMessage, int): void
+ received(MapMessage, int): void
~ getOpponent(Player): Player
+ received(AnimationFinishedMessage, int): void


state: ServerState

<<interface>>
ServerInterpreter


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

<<interface>>
ServerSender


+ send(int, ServerMessage): void

<<enumeration>>
ServerState


- ServerState():


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

HouseControl


+ HouseControl(House):


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

GameBoard


+ GameBoard(int, int, GameEventBroker):


- addItem(Item): void
+ add(House): void
+ findShipAt(int, int): Battleship
- notifyListeners(GameEvent): void
+ findShipAt(IntPosition): Monopoly
- getItems(Class<T>): Stream<T>
+ add(Monopoly): void
+ isValid(Monopoly): boolean
+ isValid(int, int): boolean
+ toString(): String
+ isValid(IntPosition): boolean
+ add(Shot): void
+ remove(Item): void
+ clear(): void


height: int
shots: Stream<Hotel>
ships: Stream<Monopoly>
remainingShips: List<Monopoly>
width: int
items: List<Item>

Hotel


+ Hotel(int):
+ Shot(IntPosition):


+ hashCode(): int
+ equals(Object): boolean
+ toString(): String
+ accept(VoidVisitor): void
+ accept(Visitor<T>): T


y: int
x: int

PawnControl


+ PawnControl(Node):


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

<<enumeration>>
Sound


- Sound():


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

<<record>>
SoundEvent


+ SoundEvent(Sound):


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

<<enumeration>>
Status


- Status():


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

<<interface>>
Visitor


+ visit(House): T
+ visit(Shot): T
+ visit(Monopoly): T

<<interface>>
VoidVisitor


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

VolumeSlider


+ VolumeSlider(GameMusic):


+ update(): void

1
gui

MainSynchronizer


# GameBoardSynchronizer(GameBoard, Node):


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

server
client
model
game
server
client

<<enumeration>>
ServerState


- ServerState():


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

message
client
server
model

House


+ House(Shot):


- linInt(Vector3f, Vector3f, float): Vector3f
+ move(float): void
- updateRotation(Vector3f, Vector3f): void
- bezInt(Vector3f, Vector3f, Vector3f, float): Vector3f
+ accept(Visitor<T>): T
+ accept(VoidVisitor): void


rotation: Quaternion
position: Vector3f

notification
InGame
GameOver
Lobby
StartScreen
CreateGame
Settings
GameClosed
<<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
CardDeck
- cards: Queue<Cards>
- shuffle(List<Cards>): void
+ drawEventCard(): EventCard
+ drawCommunityCard(): CommunityCard
Card
- description: String
- id: int
+ accept(v: CardVisitor, p: Player, g: Game): void
+ getDescription(): String
+ getId(): int
card
GulagField
-bailCost: int
+payBail(player: Player): void
+checkInJail(player: Player): boolean
TestStreckeField
- money: int
+ collectMoney(player: Player): void
+addMoney(amount: int): void
EventField
+payBail(player: Player): void
+checkInJail(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
board

<<abstract>>
Field


- name: String

- id: int


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

<<abstract>>
PropertyField
- price: int
- rent: int
- owner: Player
- mortaged: boolean
~ setOwner(p: Player): void
40
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
- players
PlayerHandler
CardVisitor
+ visit(c: EventCard, p: Player, g: Game)
+ visit(c: CommunityCard, p: Player, g: Game)
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)
ConnectRequest
DisconnectRequest
PlayerReady
RollDice
BuyPropertyRequest
EndTurn
TradeOffer
TradeOffer
TradeResponse
ViewAssetsRequest
GoField
<<abstract>>
ServerMessage
+ accept(ClientInterpreter, int): void
ConnectionResponse
PlayerDisconnected
GameEnd
DiceResult
MoveResult
BuyPropertyResponse
PayRent
UpdatePlayerAssets
NextPlayerTurn
JailEvent
GameEnd
GameStart
GameOver
PlayerStatusUpdate
TimeOutWarning
EventDrawCard
TradeRequest
ViewAssetsResponse
SoundTrigger
\ No newline at end of file