-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from Poeschl/obfuscate-map-data
Minimize map tile transfer
- Loading branch information
Showing
16 changed files
with
289 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
backend/src/main/kotlin/xyz/poeschl/roborush/controller/restmodels/MapDtos.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
package xyz.poeschl.roborush.controller.restmodels | ||
|
||
import xyz.poeschl.roborush.models.Position | ||
import xyz.poeschl.roborush.models.Size | ||
import xyz.poeschl.roborush.repositories.Map | ||
import xyz.poeschl.roborush.repositories.Tile | ||
|
||
data class MapGenerationResult(val warnings: List<String>) | ||
|
||
data class MapActiveDto(val active: Boolean) | ||
|
||
data class MapAttributeSaveDto(val mapName: String, val maxRobotFuel: Int, val solarChargeRate: Double) | ||
|
||
data class PlaygroundMap( | ||
val id: Long, | ||
val mapName: String, | ||
val size: Size, | ||
val possibleStartPositions: List<Position>, | ||
val targetPosition: Position, | ||
val maxRobotFuel: Int = 300, | ||
val solarChargeRate: Double = 0.0, | ||
val active: Boolean = false, | ||
val mapData: List<Tile> = mutableListOf(), | ||
val minHeight: Int, | ||
val maxHeight: Int | ||
) { | ||
|
||
constructor(map: Map, minHeight: Int, maxHeight: Int) : this( | ||
map.id!!, | ||
map.mapName, | ||
map.size, | ||
map.possibleStartPositions, | ||
map.targetPosition, | ||
map.maxRobotFuel, | ||
map.solarChargeRate, | ||
map.active, | ||
map.mapData, | ||
minHeight, | ||
maxHeight | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.