dev.robocode.tankroyale.botapi.mapper.GameSetupMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robocode-tankroyale-bot-api Show documentation
Show all versions of robocode-tankroyale-bot-api Show documentation
Robocode Tank Royale Bot API for Java
package dev.robocode.tankroyale.botapi.mapper;
import dev.robocode.tankroyale.botapi.GameSetup;
/**
* Utility class for mapping a game setup.
*/
public final class GameSetupMapper {
// Hide constructor to prevent instantiation
private GameSetupMapper() {
}
public static GameSetup map(final dev.robocode.tankroyale.schema.GameSetup source) {
return new GameSetup(
source.getGameType(),
source.getArenaWidth(),
source.getArenaHeight(),
source.getNumberOfRounds(),
source.getGunCoolingRate(),
source.getMaxInactivityTurns(),
source.getTurnTimeout(),
source.getReadyTimeout());
}
}