/*
 *   This file is a part of the SteamWar software.
 *
 *   Copyright (C) 2025 SteamWar.de-Serverteam
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Affero General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *   GNU Affero General Public License for more details.
 *
 *   You should have received a copy of the GNU Affero General Public License
 *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package de.steamwar.lobby.boatrace;

import org.bukkit.Bukkit;
import org.bukkit.Location;

public class BoatRacePositions {

    public static final Location LEADERBOARD = loc(2414, 7, 1542.5);

    public static final Location NPC = loc(2424.5, 5, 1544.5, -180, 0);

    public static final Location START = loc(2410.5, 6, 1537.5, -90, 0);

    public static final Location[][] CHECKPOINTS = new Location[][]{
            new Location[]{
                    loc(2414, 4, 1528, -90, 0),
                    loc(2415, 8, 1542),
            },
            new Location[]{
                    loc(2484, 4, 1456, -180, 0),
                    loc(2494, 8, 1459),
            },
            new Location[]{
                    loc(2310, 4, 1475, 0, 0),
                    loc(2321, 8, 1477),
            },
            new Location[]{
                    loc(2428, 4, 1448, -90, 0),
                    loc(2430, 8, 1458),
            },
            new Location[]{
                    loc(2392, 4, 1492, 90, 0),
                    loc(2394, 8, 1502),
            },
            new Location[]{
                    loc(2414, 4, 1528, -90, 0),
                    loc(2416, 8, 1542),
            },
    };

    public static final Location[] BACKWARDS = new Location[]{
            loc(2407, 3, 1526),
            loc(2408, 9, 1544)
    };

    public static final Location END = loc(2449.5, 6, 1550, -180, 0);

    private static Location loc(double x, double y, double z) {
        return new Location(Bukkit.getWorlds().get(0), x, y, z);
    }

    private static Location loc(double x, double y, double z, float yaw, float pitch) {
        return new Location(Bukkit.getWorlds().get(0), x, y, z, yaw, pitch);
    }
}
