diff --git a/Klassendiagramm.svg b/Klassendiagramm.svg index ed9aafc..d8cd095 100644 --- a/Klassendiagramm.svg +++ b/Klassendiagramm.svg @@ -1 +1,4 @@ -7V1bd5pKG/41Wct9YRdn8NLoTpvdtMluDm2vvkWUKLsIFjCJ/fXfDAIC83IQYVBgX+zGEVDneWbe8zsX/GT1/tFW18sv1lwzLjhm/n7BTy84TmBFDv2DR7a7EU4cSbuRha3Pd2PsfuBe/6P5g4w/utHnmhO70LUsw9XX8cGZZZrazI2NqbZtvcUve7GM+Keu1YVGDNzPVIMc/a7P3aU/KonC/o1Pmr5YBh/NSqPdOys1uNr/Kc5SnVtvkSH+7wt+YluWu/tr9T7RDDx9wcR8v95+N25+SR//+df5rT5efn74+jTcPezqkFvC32Brplv60X9+vVx9ehL++7G+u/r3jfk4fv5n6N/CvKrGxp+wj+pK83+vuw1m0XnTV4ZqoleXL5bp3vvvoCm4VA19YaK/Z+i7aTYaeNVsV0cAjP03XGuNRmdL3ZjfqFtrg3+B46qzX8Gry6Vl63/QY1UDvcWiAfS27fpc4qTYFff4TjTMoFFbc9A1d8G0sOHQjeq4/jUzyzDUtaM/e18YX7JS7YVuXlqua62CB1kbc67N/Vchzt4L17Z+hdTB9xcEwwcNz4b2HuGiD85HzVpprr1Fl/jvKv4dwUrzoXnbs5Yf+WPLCGE52R9U/ZWyCJ8cftg3tLJUc4GmIPw0jmdiH8cK5OexEvR5UvzjVAPBbqqudokn0YlSEP0R+aH7IY+YB5BUIEhKENTQPXIu3dWeQ0ngAqYa2osL8HSlz+f4cZfOWp3p5uIB83Y6ZPcjN96NU34/8s2fF94jkau66o5nmDmG+qwZd5aju7qFn2/vrr1cW7rpepMnXl6IU2/EdieWib6xqnuc0hB/3zTMYYBtmes4n23bOIx59OKFdHbFcM4A9ZOy4i6/GD9+ji1Lf3n88TYeOkOeBVC9xLvPYONo9jXeTV7UGXpr/Bh9/ReBPfrFLoT9xDIstCFNTWu3cemGkRgqyoi3pe5q92vv20zfkKQk9o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IUBLErsNCJGPiSGh45hT2gBHrojcU6zcUCa5BhqIAGW580j/SQkMR8tjy867H/9lKeuqBnKpNO4LMFt5b8XettPsr6aVHFyKoQS6P9IIeoDQbkTJAUCsZDNBTK30zh/fhgrKcqCLE9t0o68AVyoGCcK3POwP2CIrqzoO1rb3q1sbxFGlvHUb0avSpDI4z73WR9BZd5+24qaZ5Ht1FS+YmInBfdFPHhUCDtnhqqul7R1fggcjMbLXjwEBZT1SB4cmuKhR9aKUKx1t1Wkzg8cot8vTVj6bP7kuecSrkpE8krg92orTrCR9K4oajvWmgH5lpcg2ULHk+0JVM0U18XGs6v2U/dUexLMR4x+cQW2aYo65XpFH9vCZ7OzTWQqZchCS3hUzTtGYZqTCvhSN5fVSorFExHw2V5XbJiknscvmXec1kKmRFZnZ//om89SRgJs8Ok0b8B2n/nxx/XlXJmMn6bpnP3hJZ+dgbJEWofxMlu1mcakJz851s69toRycdZiY6X8g5acWyJGZdXw+TG+0oV6bTKn0aA6fInoBOzDTBaSmIIgWW2IgCRbP71tFUU8roq23YZ4uqLizfBClHCTNKYsTMfTZ5/YgGidmG7a5yKoN8UD/Gs9tsD7HUmmA2J/h5Y/s8WCUn8YwRM284lNzopW1ZbvRyW10vv1hzDV/xfw== \ No newline at end of file + + + +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>>Strategy 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>>Space 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
Text is not SVG - cannot display
\ No newline at end of file diff --git a/README.md b/README.md index 77fb651..7754444 100644 --- a/README.md +++ b/README.md @@ -41,5 +41,5 @@ The winner gets determined automatically.
The car that first passes the fin We choose a simple branching model where all starting features got a branch and where merged into the main branch, some branches who needed unfinished code to be completed where taken from the game branch but merged into the main at the end as well.
Since there was just one end product we abstained from using a development branch and merges where done straight into main branch.
Commits which contain only documentation and doesn't change any functionality are committed directly into the Main branch. ## Class Diagramm -This Class Diagramm is additional to the Class Diagramm given in the Anleitung.pdf
+This Class Diagramm is additional to the Class Diagramm given in the Anleitung.pdf

![Classdiagramm of this program](./Klassendiagramm.svg) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFollowerMoveStrategy.java b/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFollowerMoveStrategy.java index f1ab6a8..0cdfae4 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFollowerMoveStrategy.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/strategy/PathFollowerMoveStrategy.java @@ -34,14 +34,14 @@ public class PathFollowerMoveStrategy implements MoveStrategy { /** * Constructor to create a new PathFollowerMoveStrategy for a car. - * @param path The location where the file is saved + * @param trackFile The location where the file is saved * @param startPosition The start position of the car * @throws FileNotFoundException If the file with the given path does not exist. */ - public PathFollowerMoveStrategy(String path, PositionVector startPosition) throws FileNotFoundException { + public PathFollowerMoveStrategy(File trackFile, PositionVector startPosition) throws FileNotFoundException { pointList = new ArrayList<>(); pointer = 0; - readFile(new File(path)); + readFile(trackFile); currentPosition = startPosition; currentVelocity = new PositionVector(0, 0); } diff --git a/src/test/java/ch/zhaw/pm2/racetrack/TrackTest.java b/src/test/java/ch/zhaw/pm2/racetrack/TrackTest.java index 4d88811..eeb9e84 100644 --- a/src/test/java/ch/zhaw/pm2/racetrack/TrackTest.java +++ b/src/test/java/ch/zhaw/pm2/racetrack/TrackTest.java @@ -2,13 +2,14 @@ package ch.zhaw.pm2.racetrack; import ch.zhaw.pm2.racetrack.given.ConfigSpecification; import org.junit.jupiter.api.*; - import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.List; - +/** + * This Class tests the track + */ public class TrackTest { Track trackObj;