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

dev.robocode.tankroyale.botapi.mapper.InitialPositionMapper 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.InitialPosition;

/**
 * Utility class for mapping an initial starting position.
 */
public final class InitialPositionMapper {

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

    public static dev.robocode.tankroyale.schema.InitialPosition map(final InitialPosition source) {
        if (source == null) return null;

        var initialPosition = new dev.robocode.tankroyale.schema.InitialPosition();
        initialPosition.setX(source.getX());
        initialPosition.setY(source.getY());
        initialPosition.setDirection(source.getDirection());
        return initialPosition;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy