

export default class SilverFangMiniGame {
    cards: Number[] = []
    rows: Number = 0
    cols: Number = 0


    constructor() {
        

    }

    recalculateBoardSize() {
        const numCards = this.cards.length

        let solutions = []

        for (let x = 1; x < numCards; x++) {
            for (let y = 1; y < numCards; y++) {
                if (x*y === numCards) {
                    solutions.push([x, y, Math.abs(x-y)])
                }
            }
        }
        solutions.sort((a, b) => a[2] - b[2])
        solutions.forEach(s => console.log(s))
    }

    addCards(cards: Number) {
        for(let i = 0; i < cards; i++) {
            this.cards.push(i);
        }
        this.recalculateBoardSize()
    }

    addPair(card: Number) {


    }

}