aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fa4b3a6..fd95755 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,13 +3,24 @@
#include <string>
#include "board.hpp"
+#include "moves.hpp"
Piece NonePiece = {
false,
NONE,
false,
};
+#include <iostream>
+void PrintMoves(const std::vector<Move> &moves) {
+ std::cout << "Moves (" << moves.size() << "):\n";
+
+ for (const Move &move : moves) {
+ std::cout << "(" << (int)move.From.file << ", " << (int)move.From.rank
+ << ") -> (" << (int)move.To.file << ", " << (int)move.To.rank
+ << ")\n";
+ }
+}
int main(int argc, char **argv) {
printf("arg count: %d", argc);
std::string startingFen =
@@ -31,5 +42,7 @@ int main(int argc, char **argv) {
};
setBoardFen(startingFen, &b);
printBoard(&b);
+ auto moves = GetLegalMoves(&b);
+ PrintMoves(moves);
return EXIT_SUCCESS;
}