Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
Public Member Functions | Private Member Functions | List of all members
CFourCover Class Reference

Four-cover tourney generator. More...

#include <FourCover.h>

Public Member Functions

void Generate (CBoard &b)
 Generate a four-cover tourney. More...
 

Private Member Functions

void Generate4Cycle (CBoard &b, int v[4])
 Generate a 4-cycle. More...
 

Detailed Description

A four-cover tourney has width and height divisible by 4 and consists of copies of the following \(4 \times 4\) tourney of size \(4\).

FourCover.png

Definition at line 38 of file FourCover.h.

Member Function Documentation

◆ Generate()

void CFourCover::Generate ( CBoard b)

Generate a four-cover tourney. Assumes that the board has both width and height divisible by 4. Does nothing otherwise.

Parameters
b[in, out] Chessboard.

Definition at line 45 of file FourCover.cpp.

◆ Generate4Cycle()

void CFourCover::Generate4Cycle ( CBoard b,
int  v[4] 
)
private

Generate a 4-cycle, that is, a cycle of length 4, given four cell indices which represent the four vertices in the cycle. Assumes that the vertices are separated by knight's moves.

Parameters
b[in, out] Chessboard.
vArray of four vertices.

Definition at line 34 of file FourCover.cpp.