Compare commits
4 Commits
4792daf127
...
139a5c7d8f
Author | SHA1 | Date | |
---|---|---|---|
|
139a5c7d8f | ||
|
3a2988d351 | ||
|
c758d1854f | ||
|
53a0755547 |
@ -1,6 +1,4 @@
|
||||
#include <cctype>
|
||||
#include <ios>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@ -25,7 +23,7 @@ enum CastleRights {
|
||||
};
|
||||
|
||||
class Board {
|
||||
public: // make this private after debugging
|
||||
private:
|
||||
int squares[64] = {Piece::None};
|
||||
Colour turn;
|
||||
int castle_rights;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "board.cpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
std::string pos =
|
||||
"rnbq1k1r/pp1Pbppp/2p5/8/2B5/8/PPP1NnPP/RNBQK2R w KQ - 1 8";
|
||||
|
@ -1,20 +1,5 @@
|
||||
#include "../board.cpp"
|
||||
|
||||
#define IS_TRUE(x) \
|
||||
{ \
|
||||
if (!(x)) \
|
||||
std::cout << __FUNCTION__ << " failed on line " << __LINE__ \
|
||||
<< std::endl; \
|
||||
}
|
||||
|
||||
#define ASSERT_EQUALS(expected, actual) \
|
||||
{ \
|
||||
if (expected != actual) \
|
||||
std::cout << "Expected: " << std::endl \
|
||||
<< '\t' << expected << std::endl \
|
||||
<< "Got: " << std::endl \
|
||||
<< '\t' << actual << std::endl; \
|
||||
}
|
||||
#include "lib.cpp"
|
||||
|
||||
int main() {
|
||||
std::string pos = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR";
|
||||
|
10
cpp/tests/lib.cpp
Normal file
10
cpp/tests/lib.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#define ASSERT_EQUALS(expected, actual) \
|
||||
{ \
|
||||
if (expected != actual) \
|
||||
std::cout << "Expected: " << std::endl \
|
||||
<< '\t' << expected << std::endl \
|
||||
<< "Got: " << std::endl \
|
||||
<< '\t' << actual << std::endl; \
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user