Skip to content

Commit b9d04a8

Browse files
author
Jesper Torp Kristensen
committed
Refactoring: trying to add some structure
1 parent 1f2c8bd commit b9d04a8

File tree

101 files changed

+997
-1253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+997
-1253
lines changed
File renamed without changes.

src/Makefile

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,13 @@ CFLAGS_DB = -ggdb3 -pg -Wall -pedantic -ansi
55
CFLAGS_XB = -O3 -Wall -pedantic -ansi -DNDEBUG -DXBOARD
66
CFLAGS_DB_XB = -ggdb3 -pg -Wall -pedantic -ansi -DXBOARD
77

8-
MODS = board.o endgame_table_bdd.o mapping_of_wildcards.o \
9-
endgame_run_length_encoding.o run_length_encoding/bit_stream.o \
10-
endgame_clustering_functions.o board_2.o endgame_castling.o \
11-
endgame_piece_enumerations.o endgame_square_permutations.o \
12-
binary_decision_diagram.o endgame_database.o endgame_indexing.o \
13-
endgame_en_passant.o typedefs.o \
14-
\
15-
chess.o \
16-
\
17-
cpu_communication_module.o xboard_listener.o streams.o help_functions.o settings.o \
18-
move_and_undo.o board_tables.o board_move_tables.o \
19-
board_2_plus.o static_exchange_evaluation.o \
20-
board_3.o \
21-
\
22-
cpu_evaluation_1.o cpu_evaluation_2.o cpu_evaluation_2_const.o cpu_evaluation_3.o \
23-
cpu_search_1.o cpu_search_2.o cpu_search_3.o \
24-
cpu_engines.o cpu_search.o engine.o \
25-
\
26-
file_loader.o parser.o test_suite.o \
27-
hash_value.o hash_table.o transposition_table_content.o opening_library.o \
28-
game_phase.o piece_values.o unsigned_long_long.o \
29-
\
30-
my_vector.o clustering_algorithm.o bdd_compression.o
8+
SOURCES = $(wildcard *.cxx) $(wildcard */*.cxx) $(wildcard */*/*.cxx)
9+
MODS = $(SOURCES:.cxx=.o)
3110

3211
all: chess
3312

3413
chess: $(MODS)
3514
g++ $(MODS) -o $@
36-
#-g -ggdb3
3715

3816
%.o: %.cxx
3917
$(CXX) $(CFLAGS) -c -o $@ $<

src/board.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include "board.hxx"
66

7-
#include "endgame_castling.hxx"
8-
#include "endgame_en_passant.hxx"
7+
#include "endgames/endgame_castling.hxx"
8+
#include "endgames/endgame_en_passant.hxx"
99

1010
const bool WHITE_PIECE[13] =
1111
{ false,

src/board.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <assert.h>
77

88
#include "typedefs.hxx"
9-
#include "help_functions.hxx"
9+
#include "util/help_functions.hxx"
1010
#include "parser.hxx"
1111

1212
#define PRINT_CONSTRUCTOR_DESTRUCTOR_CALLS false

src/board_2.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
#include <assert.h>
44
#include <bitset>
55

6-
#include "help_functions.hxx"
6+
#include "util/help_functions.hxx"
77
#include "board_move_tables.hxx"
88
#include "board_2_king_lines.hxx"
99
#include "board_define_position_constants.hxx"
10-
#include "endgame_castling.hxx"
10+
#include "endgames/endgame_castling.hxx"
1111

1212
#define INVALID_DIRECTION 16
1313
#define KNIGHT_DIRECTION 8

src/board_2.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define _BOARD_2_
33

44
#include "move_and_undo.hxx"
5-
#include "unsigned_long_long.hxx"
5+
#include "util/unsigned_long_long.hxx"
66

77
#include "board.hxx"
88

src/board_2_king_lines.hxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#include "board_tables.hxx"
55

6-
// The line below does not work if a certain optimization is on
7-
//#define checktable(pa, pl) (CHECK_TABLE[((ushort *)(&(pa)))[pl]])
86
#define checktable(pa, pl) (CHECK_TABLE[(pl) ? ((pa) >> 16) : ((pa) & 0xFFFF)])
97

108
// board_king_lines contains functionality to maintain the

src/board_2_plus.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <assert.h>
44

5-
#include "help_functions.hxx"
5+
#include "util/help_functions.hxx"
66
#include "board_define_position_constants.hxx"
77
#include "board_move_tables.hxx"
88
#include "board_tables.hxx"

src/board_3.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "board_move_tables.hxx"
55
#include "file_loader.hxx"
66

7-
#include "hash_table.hxx"
7+
#include "util/hash_table.hxx"
88

99
ostream& operator<<(ostream& os, const RepetitionInfo& rep) {
1010
os << "NumRep(" << rep.num_repetitions << ')';

0 commit comments

Comments
 (0)