Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
Tile.h
Go to the documentation of this file.
1 
4 // MIT License
5 //
6 // Copyright (c) 2019 Ian Parberry
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 
26 #if !defined(__Tile__)
27 #define __Tile__
28 
29 #include "Board.h"
30 
40 
41 class CTile{
42  private:
43  static int m_nTile6x6 [36];
44  static int m_nTile6x8 [48];
45 
46  static int m_nTile8x6 [48];
47  static int m_nTile8x8 [64];
48  static int m_nTile8x10 [80];
49 
50  static int m_nTile10x8 [80];
51  static int m_nTile10x10[100];
52  static int m_nTile10x12[120];
53 
54  static int m_nTile12x10[120];
55 
56  protected:
57  CBoard* m_pTile6x6 = nullptr;
58  CBoard* m_pTile6x8 = nullptr;
59 
60  CBoard* m_pTile8x6 = nullptr;
61  CBoard* m_pTile8x8 = nullptr;
62  CBoard* m_pTile8x10 = nullptr;
63 
64  CBoard* m_pTile10x8 = nullptr;
65  CBoard* m_pTile10x10 = nullptr;
66  CBoard* m_pTile10x12 = nullptr;
67 
68  CBoard* m_pTile12x10 = nullptr;
69 
70  public:
71  CTile();
72  ~CTile();
73 }; //CTile
74 
75 #endif
CBoard * m_pTile8x8
Pointer to an 8x8 chessboard.
Definition: Tile.h:61
CBoard * m_pTile8x10
Pointer to an 8x10 chessboard.
Definition: Tile.h:62
static int m_nTile8x8[64]
8x8 move table.
Definition: Tile.h:47
static int m_nTile10x12[120]
10x12 move table.
Definition: Tile.h:52
CBoard * m_pTile8x6
Pointer to an 8x6 chessboard.
Definition: Tile.h:60
static int m_nTile12x10[120]
12x10 move table.
Definition: Tile.h:54
static int m_nTile10x8[80]
10x8 move table.
Definition: Tile.h:50
CBoard * m_pTile6x8
Pointer to a 6x8 chessboard.
Definition: Tile.h:58
static int m_nTile10x10[100]
10x10 move table.
Definition: Tile.h:51
static int m_nTile8x10[80]
8x10 move table.
Definition: Tile.h:48
Chessboard.
Definition: Board.h:42
CBoard * m_pTile10x12
Pointer to a 10x12 chessboard.
Definition: Tile.h:66
CTile()
Constructor.
Definition: Tile.cpp:141
CBoard * m_pTile6x6
Pointer to a 6x6 chessboard.
Definition: Tile.h:57
CBoard * m_pTile10x8
Pointer to a 10x8 chessboard.
Definition: Tile.h:64
Header for the chessboard CBoard.
~CTile()
Destructor.
Definition: Tile.cpp:158
static int m_nTile8x6[48]
8x6 move table.
Definition: Tile.h:46
Base tours for the divide-and-conquer generation algorithm.
Definition: Tile.h:41
static int m_nTile6x6[36]
6x6 move table.
Definition: Tile.h:43
CBoard * m_pTile12x10
Pointer to a 12x10 chessboard.
Definition: Tile.h:68
static int m_nTile6x8[48]
6x8 move table.
Definition: Tile.h:44
CBoard * m_pTile10x10
Pointer to a 10x10 chessboard.
Definition: Tile.h:65