team02-AngryNerds-projekt1-.../README.md

46 lines
3.5 KiB
Markdown
Raw Normal View History

2022-03-04 08:58:05 +01:00
# team02-AngryNerds-projekt1-racetrack
PM2 Team 02 Projekt 1 Racetrack
2022-03-23 21:07:44 +01:00
Racetrack is a pen and paper game that dates back to the early 1960s in this version of the game, the game is digitalized and the math behind it is done automatically rather than calculated by hand and the winner gets informed automatically as well.
The aim of the game is to finish the race faster than your opponent or win by being the only survivor in case the other cars crash.
In order to not crash you have to keep in mind the acceleration and other players car to get to the finish line safely.
2022-03-23 21:11:36 +01:00
# Initialization:
2022-03-23 21:19:37 +01:00
#### The game can be initialized by the terminal command:
2022-03-23 21:07:44 +01:00
./gradlew run
2022-03-23 21:19:37 +01:00
You will then be prompted to select a track file from the selection by entering the corresponding number.
2022-03-23 21:08:57 +01:00
2022-03-23 21:19:37 +01:00
#### For each car that is taking part in the race a strategy has to be chosen there are the following options:
2022-03-23 21:08:57 +01:00
+ Do not move Strategy
2022-03-23 21:32:15 +01:00
> This Strategy sets the car stationary, and it won't make any moves during the game staying at the startpoint indefinitely.
2022-03-23 21:07:44 +01:00
+ User Move Strategy
2022-03-23 21:32:15 +01:00
> The player is prompted for each move to make a choice the different choices you are able to take are as following:
2022-03-23 21:07:44 +01:00
> > 1=down-left <br> 2=down<br> 3=down-right<br> 4=left<br> 5=no acceleration<br> 6=right <br> 7=up-left<br> 8=up<br> 9=up-right<br> it is also possible to leave the game when it is your turn by entering 10
+ Move List Strategy
> For this strategy a predefined list of moves have to be given, the list may contain all allowed moves like mentioned in User Move Strategy
2022-03-24 14:36:48 +01:00
> > To create your own Move List strategy it needs to be located in /racetrack/moves and be named as *track_name*-car-*character_of_car*.txt and be a txt file.
2022-03-23 21:07:44 +01:00
+ Path Follow Move Strategy
2022-03-24 14:36:48 +01:00
> A list of points given in a txt file where on each lime a coordinate is placed like (X:24, Y:22) gets used to calculate a path which makes the car cross each point.
> > To create your own follow move strategy it needs to be located in /racetrack/moves and be named as *track_name*_points.txt and be a txt file.
2022-03-23 21:07:44 +01:00
+ Path Finder Strategy
> The pathfinder Strategy Calculates a route itself and follows it direction fully automatically.
2022-03-23 21:32:15 +01:00
The shown Track can be interpreted as following:<br>
2022-03-24 14:36:48 +01:00
'spaces' are part of the raceable track.<br>
2022-03-23 21:32:15 +01:00
'#' is a Wall<br>
'>,<,^,v' are finish line components<br>
2022-03-24 14:36:48 +01:00
'X' is shown if a car crashes at its crash location.<br>
2022-03-23 21:32:15 +01:00
And every other character represents a car.
2022-03-24 14:36:48 +01:00
> To create your own track it needs to be located inside /racetrack/tracks and be a txt file.
2022-03-23 21:32:15 +01:00
### Determining a winner
2022-03-23 21:19:37 +01:00
The winner gets determined automatically. <br> The car that first passes the finish line (doing a complete round) is given the win, if all car except one crash the surviving car will be crowned as the winner.<br>The game will inform you of this, and you will have the option to quit the game or play another match.
2022-03-23 21:32:15 +01:00
## Branching Model
2022-03-25 11:05:29 +01:00
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.<br> Since there was just one end product we abstained from using a development branch and merges where done straight into main branch.<br>Commits which contain only documentation and doesn't change any functionality are committed directly into the Main branch.
2022-03-23 21:32:15 +01:00
## Class Diagramm
2022-03-25 20:28:47 +01:00
This Class Diagramm is additional to the Class Diagramm given in the Anleitung.pdf<br><br>
![Classdiagramm of this program](./Klassendiagramm.svg)