Search in sources :

Example 1 with AnkiVehicle

use of de.adesso.anki.sdk.AnkiVehicle in project anki-battle-showcase by adessoAG.

the class AnkiInitializer method connectToAnki.

@SneakyThrows
private void connectToAnki() {
    log.info("Connecting to Anki Gateway at 10.200.100.12...");
    gateway = new AnkiGateway("10.200.100.12", 5000);
    ankiVehicles = gateway.findVehicles();
    for (AnkiVehicle anki : ankiVehicles.subList(0, 1)) {
        myVehicle = new Vehicle();
        myVehicle.setAnkiReference(anki);
        anki.connect();
        anki.sendMessage(new SdkModeMessage());
        world.addBody(myVehicle);
    }
}
Also used : AnkiVehicle(de.adesso.anki.sdk.AnkiVehicle) AnkiVehicle(de.adesso.anki.sdk.AnkiVehicle) Vehicle(de.adesso.anki.battle.world.bodies.Vehicle) AnkiGateway(de.adesso.anki.sdk.AnkiGateway) SneakyThrows(lombok.SneakyThrows)

Aggregations

Vehicle (de.adesso.anki.battle.world.bodies.Vehicle)1 AnkiGateway (de.adesso.anki.sdk.AnkiGateway)1 AnkiVehicle (de.adesso.anki.sdk.AnkiVehicle)1 SneakyThrows (lombok.SneakyThrows)1