From 8233758ca82b4b0866b469969620ba557df3b912 Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 25 Mar 2022 22:11:42 +0100 Subject: [PATCH] Klassendiagramm.svg updated --- Klassendiagramm.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Klassendiagramm.svg b/Klassendiagramm.svg index ba81636..bf0d223 100644 --- a/Klassendiagramm.svg +++ b/Klassendiagramm.svg @@ -1 +1 @@ -Game
+Game(userInterface:UserInterface)
+Game(userInterface:UserInterface)
+initPhase();boolean
+initPhase();boolean
#selectTrack(selectedTrack:File):Track
#selectTrack(selectedTrack:File):Track
#selectMoveStrategy(car:Car,strategy:MoveStrategy);
#selectMoveStrategy(car:Car,strategy:MoveStrategy);
+gamePhase();
+gamePhase();
+onlyOneCarLeft();boolean
+onlyOneCarLeft();boolean
+carsMoving();boolean
+carsMoving();boolean
Track
-track:List<String>
-track:List<String>
+CRASH_INDICATOR:char{final}
+CRASH_INDICATOR:char{final}
-finishLine:List<PositionVector>{final}
-finishLine:List<PositionVector>{final}
-finishTyp:ConfigSpecification.SpaceType
-finishTyp:ConfigSpecification.SpaceType
-cars:List<Car>
-cars:List<Car>
+Track(trackFile:File)
+Track(trackFile:File)
-readFile(trackFile:File)
-readFile(trackFile:File)
-addCars()
-addCars()
-findFinish()
-findFinish()
-findChar(symbol:char);PositionVector
-findChar(symbol:char);PositionVector
-drawCharOnTrackIndicator(positionVector:PositionVector,symbol:char)
-drawCharOnTrackIndicator(positionVector:PositionVector,symbol:char)
+getFinishLine();List<PositionVector>
+getFinishLine();List<PositionVector>
+getTrack()
+getTrack()
+moveCar(carIndex:int)
+moveCar(carIndex:int)
-makeCarMoveInTrack(carIndex:int)
-makeCarMoveInTrack(carIndex:int)
+willCrashAtPosition(carIndex:int,positionVector:PositionVector);boolean
+willCrashAtPosition(carIndex:int,positionVector:PositionVector);boolean
+carDoesCrash(carIndex:int,crashPositionVector:PositionVector)
+carDoesCrash(carIndex:int,crashPositionVector:PositionVector)
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<PositionVector>
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<Positi...
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<PositionVector>
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<Positi...
PositionVectorConfig<<enumeration>>Space Type<<enumeration>>DirectionCar
-id:char{final,readOnly}
-id:char{final,readOnly}
-position:PositionVector
-position:PositionVector
-velocity:PositionVector{readOnly}
-velocity:PositionVector{readOnly}
-crashed:boolean{readOnly}
-crashed:boolean{readOnly}
-winPoints:int
-winPoints:int
-moveStrategy:MoveStrategy
-moveStrategy:MoveStrategy
+Car(id:char,position:PositionVector)
+Car(id:char,position:PositionVector)
+nextPosition();PositionVector
+nextPosition();PositionVector
+accelerate(aceleration:Direction)
+accelerate(aceleration:Direction)
+move()
+move()
+crash()
+crash()
+getID()
+getID()
+increaseWinPoints()
+increaseWinPoints()
+deductWinPoints()
+deductWinPoints()
+getWinPoints():int
+getWinPoints():int
+getVelocity():PositionVector
+getVelocity():PositionVector
+setPosition(position:PositionVector{final})
+setPosition(position:PositionVector{final})
+nextPosition():PositionVector
+nextPosition():PositionVector
+accelerate(acceleration:PositionVector.Direction)
+accelerate(acceleration:PositionVector.Direc...
+move()
+move()
+crash()
+crash()
+isCrashed();boolean
+isCrashed();boolean
+setMoveStrategy(moveStrategy:MoveStrategy)
+setMoveStrategy(moveStrategy:MoveStrategy)
+gettMoveStrategy();MoveStrategy
+gettMoveStrategy();MoveStrategy
<<enumeration>>Strategy Type
Strategy
Strategy
MoveListStrategy
-moveList:List<Direction>
-moveList:List<Direction>
-pointer:int
-pointer:int
+MoveListStrategy(path:String)
+MoveListStrategy(path:String)
+nextMove();Direction
+nextMove();Direction
-readFile(trackFile:File)
-readFile(trackFile:File)
DoNotMoveStrategy
+nextMove();Direction
+nextMove();Direction
PathFollowerMoveStrategy
-currentPosition:PositionVector
-currentPosition:PositionVector
-currentVelocity:PositionVector
-currentVelocity:PositionVector
-pointList:ArrayList<PositionVector>
-pointList:ArrayList<PositionVector>
-pointer:int
-pointer:int
+PathFollowerMoveStrategy(path:String,startPosition:PositionVector)
+PathFollowerMoveStrategy(path:String,startPosition:PositionVector)
+readFile(trackFile:File)
+readFile(trackFile:File)
+nextMove();Direction
+nextMove();Direction
UserMoveStrategy
-userInterface:UserInterface
-userInterface:UserInterface
-carIndex :int
-carIndex :int
-carID:char
-carID:char
+UserMoveStrategy(userInterface:UserInterface,carIndex:int,carID:char)
+UserMoveStrategy(userInterface:UserInterface,carIndex:int,carID:...
+nextMove();Direction
+nextMove();Direction
InvalidFileFormatExceptionInvalidTrackFormatExceptionMainUserInterface
-textIO:TextIO{final}
-textIO:TextIO{final}
-textTerminal:TextTerminal{final}
-textTerminal:TextTerminal{final}
+UserInterface(welcomeText:String)
+UserInterface(welcomeText:String)
+printInformation(text:String)
+printInformation(text:String)
+selectOption(text:String,options:List<String>):int
+selectOption(text:String,options:List<String>):int
+selectDirection(playingCarIndex:int,playingCarID:char):PositionVector.Direction
+selectDirection(playingCarIndex:int,playingCarID:char):PositionVector.Dire...
-getDirection(number:int):PositionVector.Direction
-getDirection(number:int):PositionVector.Direction
+printTrack(track:Track)
+printTrack(track:Track)
+quit(text:String)
+quit(text:String)
PathFinderMoveStrategy
-track:Track
-track:Track
-carIndex:int
-carIndex:int
-moveList:List<PositionVector.Direction>
-moveList:List<PositionVector.Direction>
-allDirections:List<PositionVector.Direction>
-allDirections:List<PositionVector.Direction>
-calculatedStates:List<State>
-calculatedStates:List<State>
+PathFinderMoveStrategy(track:Track,carIndex)
+PathFinderMoveStrategy(track:Track,carIndex)
-createMoveList()
-createMoveList()
-alreadyCalculated(state:State);boolean
-alreadyCalculated(state:State);boolean
+nextMove();Direction
+nextMove();Direction
State
#position:PositionVector
#position:PositionVector
#velocity:PositionVector
#velocity:PositionVector
+State(position:PositionVector,velocity:PositionVector)
+State(position:PositionVector,velocity:PositionVe...
equals(compareState:State);boolean
equals(compareState:State);boolean
PossibleMove
#directions:List<PositionVector.Direction>
#directions:List<PositionVector.Direction>
#startPosition:PositionVector
#startPosition:PositionVector
#endPosition:PositionVector
#endPosition:PositionVector
#endVelocity:PositionVector
#endVelocity:PositionVector
+PossibleMove(previousMove:PossibleMove, nextDirection:PositionVector.Direction)
+PossibleMove(previousMove:PossibleMove, nextDirection:PositionVector.Direct...
+finished();boolean
+finished();boolean
+crashed();boolean
+crashed();boolean
Viewer does not support full SVG 1.1
\ No newline at end of file +Game
+Game(userInterface:UserInterface)
+Game(userInterface:UserInterface)
+initPhase();boolean
+initPhase();boolean
-getPathFollowerMoveStrategy(selectedTrack:File,carIndex:int)
-getPathFollowerMoveStrategy(selectedTrack:File,carIndex:int)
-getMoveListStrategy(selectedTrack:File,carIndex:int)
-getMoveListStrategy(selectedTrack:File,carIndex:int)
#selectTrack(selectedTrack:File):Track
#selectTrack(selectedTrack:File):Track
#selectMoveStrategy(car:Car,strategy:MoveStrategy);
#selectMoveStrategy(car:Car,strategy:MoveStrategy);
+gamePhase();
+gamePhase();
+onlyOneCarLeft();boolean
+onlyOneCarLeft();boolean
+carsMoving();boolean
+carsMoving();boolean
Track
-track:List<String>
-track:List<String>
+CRASH_INDICATOR:char{final}
+CRASH_INDICATOR:char{final}
-finishLine:List<PositionVector>{final}
-finishLine:List<PositionVector>{final}
-finishTyp:ConfigSpecification.SpaceType
-finishTyp:ConfigSpecification.SpaceType
-cars:List<Car>
-cars:List<Car>
+Track(trackFile:File)
+Track(trackFile:File)
-readFile(trackFile:File)
-readFile(trackFile:File)
-addCars()
-addCars()
-findFinish()
-findFinish()
-findChar(symbol:char);PositionVector
-findChar(symbol:char);PositionVector
-drawCharOnTrackIndicator(positionVector:PositionVector,symbol:char)
-drawCharOnTrackIndicator(positionVector:PositionVector,symbol:char)
+getFinishLine();List<PositionVector>
+getFinishLine();List<PositionVector>
+getTrack()
+getTrack()
+moveCar(carIndex:int)
+moveCar(carIndex:int)
-makeCarMoveInTrack(carIndex:int)
-makeCarMoveInTrack(carIndex:int)
+willCrashAtPosition(carIndex:int,positionVector:PositionVector);boolean
+willCrashAtPosition(carIndex:int,positionVector:PositionVector);boolean
+carDoesCrash(carIndex:int,crashPositionVector:PositionVector)
+carDoesCrash(carIndex:int,crashPositionVector:PositionVector)
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<PositionVector>
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<Positi...
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<PositionVector>
+calculatePointsOnPath(startPosition:PositionVector,endPosition:PositionVector):ArrayList<Positi...
PositionVectorConfig<<enumeration>>Space Type<<enumeration>>DirectionCar
-id:char{final,readOnly}
-id:char{final,readOnly}
-position:PositionVector
-position:PositionVector
-velocity:PositionVector{readOnly}
-velocity:PositionVector{readOnly}
-crashed:boolean{readOnly}
-crashed:boolean{readOnly}
-winPoints:int
-winPoints:int
-moveStrategy:MoveStrategy
-moveStrategy:MoveStrategy
+Car(id:char,position:PositionVector)
+Car(id:char,position:PositionVector)
+nextPosition();PositionVector
+nextPosition();PositionVector
+accelerate(aceleration:Direction)
+accelerate(aceleration:Direction)
+move()
+move()
+crash()
+crash()
+getID()
+getID()
+increaseWinPoints()
+increaseWinPoints()
+deductWinPoints()
+deductWinPoints()
+getWinPoints():int
+getWinPoints():int
+getVelocity():PositionVector
+getVelocity():PositionVector
+setPosition(position:PositionVector{final})
+setPosition(position:PositionVector{final})
+nextPosition():PositionVector
+nextPosition():PositionVector
+accelerate(acceleration:PositionVector.Direction)
+accelerate(acceleration:PositionVector.Direc...
+move()
+move()
+crash()
+crash()
+isCrashed();boolean
+isCrashed();boolean
+setMoveStrategy(moveStrategy:MoveStrategy)
+setMoveStrategy(moveStrategy:MoveStrategy)
+gettMoveStrategy();MoveStrategy
+gettMoveStrategy();MoveStrategy
<<enumeration>>Strategy Type
Strategy
Strategy
MoveListStrategy
-moveList:List<Direction>
-moveList:List<Direction>
-pointer:int
-pointer:int
+MoveListStrategy(path:String)
+MoveListStrategy(path:String)
+nextMove();Direction
+nextMove();Direction
-readFile(trackFile:File)
-readFile(trackFile:File)
DoNotMoveStrategy
+nextMove();Direction
+nextMove();Direction
PathFollowerMoveStrategy
-currentPosition:PositionVector
-currentPosition:PositionVector
-currentVelocity:PositionVector
-currentVelocity:PositionVector
-pointList:ArrayList<PositionVector>
-pointList:ArrayList<PositionVector>
-pointer:int
-pointer:int
+PathFollowerMoveStrategy(path:String,startPosition:PositionVector)
+PathFollowerMoveStrategy(path:String,startPosition:PositionVector)
+readFile(trackFile:File)
+readFile(trackFile:File)
+nextMove();Direction
+nextMove();Direction
UserMoveStrategy
-userInterface:UserInterface
-userInterface:UserInterface
-carIndex :int
-carIndex :int
-carID:char
-carID:char
+UserMoveStrategy(userInterface:UserInterface,carIndex:int,carID:char)
+UserMoveStrategy(userInterface:UserInterface,carIndex:int,carID:...
+nextMove();Direction
+nextMove();Direction
InvalidFileFormatExceptionInvalidTrackFormatExceptionMainUserInterface
-textIO:TextIO{final}
-textIO:TextIO{final}
-textTerminal:TextTerminal{final}
-textTerminal:TextTerminal{final}
+UserInterface(welcomeText:String)
+UserInterface(welcomeText:String)
+printInformation(text:String)
+printInformation(text:String)
+selectOption(text:String,options:List<String>):int
+selectOption(text:String,options:List<String>):int
+selectDirection(playingCarIndex:int,playingCarID:char):PositionVector.Direction
+selectDirection(playingCarIndex:int,playingCarID:char):PositionVector.Dire...
-getDirection(number:int):PositionVector.Direction
-getDirection(number:int):PositionVector.Direction
+printTrack(track:Track)
+printTrack(track:Track)
+quit(text:String)
+quit(text:String)
PathFinderMoveStrategy
-track:Track
-track:Track
-carIndex:int
-carIndex:int
-moveList:List<PositionVector.Direction>
-moveList:List<PositionVector.Direction>
-allDirections:List<PositionVector.Direction>
-allDirections:List<PositionVector.Direction>
-calculatedStates:List<State>
-calculatedStates:List<State>
+PathFinderMoveStrategy(track:Track,carIndex)
+PathFinderMoveStrategy(track:Track,carIndex)
-createMoveList()
-createMoveList()
-alreadyCalculated(state:State);boolean
-alreadyCalculated(state:State);boolean
+nextMove();Direction
+nextMove();Direction
State
#position:PositionVector
#position:PositionVector
#velocity:PositionVector
#velocity:PositionVector
+State(position:PositionVector,velocity:PositionVector)
+State(position:PositionVector,velocity:PositionVe...
equals(compareState:State);boolean
equals(compareState:State);boolean
PossibleMove
#directions:List<PositionVector.Direction>
#directions:List<PositionVector.Direction>
#startPosition:PositionVector
#startPosition:PositionVector
#endPosition:PositionVector
#endPosition:PositionVector
#endVelocity:PositionVector
#endVelocity:PositionVector
+PossibleMove(previousMove:PossibleMove, nextDirection:PositionVector.Direction)
+PossibleMove(previousMove:PossibleMove, nextDirection:PositionVector.Direct...
+finished();boolean
+finished();boolean
+crashed();boolean
+crashed();boolean
Viewer does not support full SVG 1.1
\ No newline at end of file