From 8320f7ec281891501a9b3092e20d990e7fd14700 Mon Sep 17 00:00:00 2001 From: zedarider Date: Fri, 13 Jan 2017 23:19:00 +0000 Subject: made it more object oriented but removed the board implementation --- src/test_bench.cpp | 45 ++++++++++----------------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) (limited to 'src/test_bench.cpp') diff --git a/src/test_bench.cpp b/src/test_bench.cpp index 68c93fb..861f51b 100644 --- a/src/test_bench.cpp +++ b/src/test_bench.cpp @@ -1,10 +1,10 @@ /* - - description: This is the test_bench file for the chess_ai - - author: Yann Herklotz - date created: DD-MM-YYYY - + * + * description: This is the test_bench file for the chess_ai + * + * author: Yann Herklotz + * date created: DD-MM-YYYY + * */ #include "chess_ai.hpp" @@ -15,34 +15,9 @@ using namespace std; using namespace chess_ai; -int main(int argc, char** argv) { - (void)argc; - (void)argv; - - int test_id; - bool passed; - - chess_tester test_bench; - - chess_board empty_board(clear); - chess_board initial_board(initial); - - test_bench.chess_begin_test_suite(); - - test_id = test_bench.chess_begin_test("PAWN"); - chess_piece piece(pawn, white, 1, 6); - empty_board.set_piece(piece); - empty_board.print_board(); - cout << empty_board.move_piece(1, 6, 1, 4) << endl; - piece.set(pawn, white, 1, 4); - if(empty_board.at(1, 4) == piece) - passed = true; - else - passed = false; - empty_board.print_board(); - test_bench.chess_end_test(test_id, passed); - - test_bench.chess_end_test_suite(); +int main(int argc, char **argv) { + (void)argc; + (void)argv; - return 0; + return 0; } -- cgit From 6fc3dfc10ce0e690b0de9c811e617dc76104db40 Mon Sep 17 00:00:00 2001 From: zedarider Date: Sat, 14 Jan 2017 00:09:29 +0000 Subject: adding a few small comments --- src/test_bench.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/test_bench.cpp') diff --git a/src/test_bench.cpp b/src/test_bench.cpp index 861f51b..474c53b 100644 --- a/src/test_bench.cpp +++ b/src/test_bench.cpp @@ -1,23 +1,28 @@ /* * - * description: This is the test_bench file for the chess_ai + * author: Yann Herklotz + * username: ymherklotz + * email: ymherklotz@gmail.com * - * author: Yann Herklotz - * date created: DD-MM-YYYY + * ----------------------------------------------------------------------------- + * + * Main file that tests the chess ai * */ -#include "chess_ai.hpp" #include "chess_tester.hpp" +#include "chess_piece.hpp" #include using namespace std; -using namespace chess_ai; +using namespace ymhChessAI; int main(int argc, char **argv) { - (void)argc; - (void)argv; + cout << "Program name: " << argv[0] << endl; + cout << "Arguments: " << argc - 1 << endl; + + cout << endl << "====== Executed Successfully ======" << endl; return 0; } -- cgit From 1f138d96ab7f517e7842710ef3428f67a2965877 Mon Sep 17 00:00:00 2001 From: ymherklotz Date: Sun, 15 Jan 2017 19:44:15 +0000 Subject: creating the board --- src/test_bench.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test_bench.cpp') diff --git a/src/test_bench.cpp b/src/test_bench.cpp index 474c53b..ab23d6c 100644 --- a/src/test_bench.cpp +++ b/src/test_bench.cpp @@ -3,6 +3,7 @@ * author: Yann Herklotz * username: ymherklotz * email: ymherklotz@gmail.com + * date created: 13/01/17 * * ----------------------------------------------------------------------------- * @@ -12,6 +13,7 @@ #include "chess_tester.hpp" #include "chess_piece.hpp" +#include "chess_board.hpp" #include @@ -22,6 +24,10 @@ int main(int argc, char **argv) { cout << "Program name: " << argv[0] << endl; cout << "Arguments: " << argc - 1 << endl; + ChessBoard cb; + + cb.printBoard(); + cout << endl << "====== Executed Successfully ======" << endl; return 0; -- cgit From 088b948122cbf24dd9dc1dfedf4be2724bab2157 Mon Sep 17 00:00:00 2001 From: ymherklotz Date: Mon, 16 Jan 2017 01:12:25 +0000 Subject: backing up files, with parser changes --- src/test_bench.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/test_bench.cpp') diff --git a/src/test_bench.cpp b/src/test_bench.cpp index ab23d6c..a68b60c 100644 --- a/src/test_bench.cpp +++ b/src/test_bench.cpp @@ -14,6 +14,7 @@ #include "chess_tester.hpp" #include "chess_piece.hpp" #include "chess_board.hpp" +#include "board_state_parser.hpp" #include @@ -24,10 +25,6 @@ int main(int argc, char **argv) { cout << "Program name: " << argv[0] << endl; cout << "Arguments: " << argc - 1 << endl; - ChessBoard cb; - - cb.printBoard(); - cout << endl << "====== Executed Successfully ======" << endl; return 0; -- cgit From f0799aef3ff8c4a8e8ffea79c963b8f128c462b9 Mon Sep 17 00:00:00 2001 From: zedarider Date: Tue, 17 Jan 2017 15:42:18 +0000 Subject: fixed the chess board and added empty pieces to fill holes, also added forward declarations --- src/test_bench.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test_bench.cpp') diff --git a/src/test_bench.cpp b/src/test_bench.cpp index a68b60c..b1fe4ba 100644 --- a/src/test_bench.cpp +++ b/src/test_bench.cpp @@ -25,6 +25,10 @@ int main(int argc, char **argv) { cout << "Program name: " << argv[0] << endl; cout << "Arguments: " << argc - 1 << endl; + ChessBoard cb; + cb.populateBoard(); + cb.printBoard(); + cout << endl << "====== Executed Successfully ======" << endl; return 0; -- cgit