package fr.uge.code.camp;

import java.nio.file.Path;
import java.util.*;

public final class Grid {
    private final int lengthX;
    private final int lengthY;

    public Grid(int lengthX, int lengthY) {
        this.lengthX = lengthX;
        this.lengthY = lengthY;
    }

    public sealed interface Response {
        record Hit() implements Response {}
        record Nothing() implements Response {}
        record Sunk(Ship ship) implements Response {}
    }

    public enum Direction {
        LEFT, RIGHT, UP, DOWN;
    }

    public record Ship(String name, Direction direction, int length) {
        public Ship {
            Objects.requireNonNull(name);
            Objects.requireNonNull(direction);
            if (length <= 0) {
                throw new IllegalArgumentException("The length of a Ship must be strictly positive");
            }
        }
    }

    public int numberOfShips() {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public boolean addShip(Ship ship, int positionX, int positionY) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

 
    public Response bomb(int positionX, int positionY) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public void advanceTime() {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    public List<Ship> findPath(Ship shipStart, Ship shipEnd) {
        throw new UnsupportedOperationException("Not yet implemented");
    }

}
