All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.robocode.tankroyale.botapi.mapper.GameSetupMapper Maven / Gradle / Ivy

There is a newer version: 0.26.1
Show newest version
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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy