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

dev.robocode.tankroyale.botapi.mapper.ResultsMapper 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.BotResults;

/**
 * Utility class for mapping bot results.
 */
public class ResultsMapper {

    // Hide constructor to prevent instantiation
    private ResultsMapper() {
    }

    public static BotResults map(final dev.robocode.tankroyale.schema.ResultsForBot source) {
        return new BotResults(
                source.getRank(),
                source.getSurvival(),
                source.getLastSurvivorBonus(),
                source.getBulletDamage(),
                source.getBulletKillBonus(),
                source.getRamDamage(),
                source.getRamKillBonus(),
                source.getTotalScore(),
                source.getFirstPlaces(),
                source.getSecondPlaces(),
                source.getThirdPlaces());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy