Name | Github |
---|---|
Jannik Alexander | @InstantRegrets |
Oliver Wichmann | @OliverW21 |
Thomas Raser | @ThmsRa |
Access Robocop on cides03.gm.fh-koeln.de:8103 if you dare...
player-robocop
Maven PackageRunAll
run configuration. This will start spring and the Vue frontendTo setup an IntelliJ database connection:
jdbc:h2:<ABSOLUTE/PATH/TO/DB-FILE>;AUTO_SERVER=TRUE
The rough system structure of this package looks like this:
Walk around aimlessly
Map is internally represented by two Arrays. One with planets and one with robots. Each Array has a length defined by the map size. Each index in these arrays represents one position on the map like this:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
The corresponding Array to represent this map looks like this:
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
The Size of the array is calculated with (mapSize * 2)^2
.
mapSize
depends on the player count and is either 15, 20 or 35.
To represent this map in the frontend it gets parsed into a 2 dimensional array with 3 "layers". Each layer represents
one type of "tile". The tiles look like this and each one represents a characteristic of the current position:
The layers each contain a set of these indexes.
-1
means "not relevant for this layer". I.e. "the corresponding square was not explored" (all layers),
"the planet hat no space station or resources" (type layer), "there is no robot on this tile" (robot layer)
In the frontend these layers get rendered on top of each other to build an interactive, scrollable map visualization of explored planets. First the gravity layer, then the type layer and last the robot layer. A map that looks like this:
was build using these 3 layers: