package ru.samsu.mj.board.c_n;

import org.junit.Test;
import ru.samsu.mj.collection.BoardCollection;

import static org.junit.Assert.assertEquals;

/**
 * See https://oeis.org/A002872 for rooks.
 */
public class BoardGeneratorCTest {
    @Test
    public void generateByDimension2() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(2);
        int size = boards.size();
        assertEquals(2, size);
    }

    @Test
    public void generateByDimension4() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(4);
        int size = boards.size();
        assertEquals(7, size);
    }

    @Test
    public void generateByDimension6() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(6);
        int size = boards.size();
        assertEquals(31, size);
    }

    @Test
    public void generateByDimension8() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(8);
        int size = boards.size();
        assertEquals(164, size);
    }

    @Test
    public void generateByDimension10() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(10);
        int size = boards.size();
        assertEquals(999, size);
    }

    @Test
    public void generateByDimension12() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(12);
        int size = boards.size();
        assertEquals(6841, size);
    }

    @Test
    public void generateByDimension14() throws Exception {
        BoardCollection boards = BoardGeneratorC.generateByDimension(14);
        int size = boards.size();
        assertEquals(51790, size);
    }
}
@@ -189,16 +189,65 @@
  rooks.%0A
+ * See https://oeis.org/A000898 for involutions.%0A
  */%0Apubl
@@ -1784,10 +1784,1831 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void generateByDimensionInvols() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(2);%0A        int size = boards.size();%0A        assertEquals(2, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols4() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(4);%0A        int size = boards.size();%0A        assertEquals(6, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols6() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(6);%0A        int size = boards.size();%0A        assertEquals(20, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols8() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(8);%0A        int size = boards.size();%0A        assertEquals(76, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols10() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(10);%0A        int size = boards.size();%0A        assertEquals(312, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols12() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(12);%0A        int size = boards.size();%0A        assertEquals(1384, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols14() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(14);%0A        int size = boards.size();%0A        assertEquals(6512, size);%0A    %7D%0A%0A    @Test%0A    public void generateByDimensionInvols16() throws Exception %7B%0A        BoardCollection boards = BoardGeneratorC.generateByDimensionInvols(16);%0A        int size = boards.size();%0A        assertEquals(32400, size);%0A    %7D
 %0A%7D

add involutions C tests