import { Color, Position } from '../../primitives.js';
export declare enum BTTile {
    Empty = 0,
    Dark = 1,
    Light = 2,
    NonExist = 3
}
export type BTColor = BTTile.Dark | BTTile.Light;
export declare class BTGridData {
    readonly tiles: BTTile[][];
    readonly connections: Position[][][];
    readonly modules: BTModule[];
    readonly width: number;
    readonly height: number;
    constructor(tiles: BTTile[][], connections: Position[][][], modules: BTModule[], width: number, height: number);
    getTile(x: number, y: number): BTTile;
    setTileWithConnection(x: number, y: number, tile: BTTile): void;
    isInBound(x: number, y: number): boolean;
    getEdges(pos: Position): Position[];
    clone(): BTGridData;
}
export declare class IntArray2D {
    private readonly array;
    readonly width: number;
    readonly height: number;
    private constructor();
    static create(width: number, height: number): IntArray2D;
    set(x: number, y: number, value: number): void;
    get(x: number, y: number): number;
    clone(): IntArray2D;
}
export interface CheckResult {
    tilesNeedCheck: IntArray2D | null;
    ratings: Rating[] | null;
}
export interface Rating {
    pos: Position;
    score: number;
}
export default abstract class BTModule {
    abstract checkGlobal(grid: BTGridData): CheckResult | false;
    checkLocal(grid: BTGridData, _: Position[]): CheckResult | boolean;
}
export declare function getOppositeColor(color: BTColor): BTColor;
export declare function colorToBTTile(color: Color): BTTile;
export declare function createOneTileResult(grid: BTGridData, pos: Position, score?: number | undefined): CheckResult;
