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();booleanTrack-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 TypeStrategyStrategyMoveListStrategy-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();DirectionPathFollowerMoveStrategy-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();DirectionUserMoveStrategy-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();DirectionInvalidFileFormatExceptionInvalidTrackFormatExceptionMainUserInterface-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();DirectionState#position:PositionVector#position:PositionVector#velocity:PositionVector#velocity:PositionVector+State(position:PositionVector,velocity:PositionVector)+State(position:PositionVector,velocity:PositionVe...equals(compareState:State);booleanequals(compareState:State);booleanPossibleMove#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();booleanViewer 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();booleanTrack-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 TypeStrategyStrategyMoveListStrategy-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();DirectionPathFollowerMoveStrategy-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();DirectionUserMoveStrategy-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();DirectionInvalidFileFormatExceptionInvalidTrackFormatExceptionMainUserInterface-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();DirectionState#position:PositionVector#position:PositionVector#velocity:PositionVector#velocity:PositionVector+State(position:PositionVector,velocity:PositionVector)+State(position:PositionVector,velocity:PositionVe...equals(compareState:State);booleanequals(compareState:State);booleanPossibleMove#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();booleanViewer does not support full SVG 1.1 \ No newline at end of file