int GameControllerStandard::diagRightLeft(int x, int y, data::IPlayer *p) // '\' { int sum = 0; countCells(x, y, p, +1, +1); // First to right down countCells(x-1, y-1, p, -1, -1); // Than to left up // (dont count double) return sum; }
int GameControllerStandard::horizontal(int x, int y, data::IPlayer *p) // '-' { int sum = 0; sum = countCells(x, y, p, -1, 0); sum += countCells(x+1, y, p, +1, 0); // (dont count double) return sum; }
void initializeCellSpace(int size) { auto cs = CellNodeSpace<DIMS>(); cs.initWithOneCell(size); CHECK("Has only one cell", cs.countCells() == 1); auto bounds = cs.getBounds(); CHECK("Is cube", bounds.isCube()); CHECK("Has correct size", bounds.getSide() == 1<<size); }
int GameControllerStandard::down(int x, int y, data::IPlayer *p) { return countCells(x, y, p, 0, 1); }