package com.trunksbomb.minetriad.game;

public record BoardCell(int row, int column) {
    public static final int SIZE = 3;

    public BoardCell {
        if (row < 0 || row >= SIZE || column < 0 || column >= SIZE) {
            throw new IllegalArgumentException("Board cells must fit within a 3x3 board");
        }
    }

    public int index() {
        return row * SIZE + column;
    }
}
