ArduChess/ArduChess.ino

40 lines
707 B
C++

#include <Arduino.h>
#include "Board.h"
#include "Move.h"
#include "Types.h"
Board b = Board();
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
char value;
while(Serial.available() == 0) {
delay(100);
}
value = Serial.read();
b.field[0x32] = char_to_piece(value);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(F("hello"));
delay(1000);
Serial.println(b.get_zobrist());
Serial.println(sizeof(b));
Move m = {0x14, 0x34, P_EMPTY};
Serial.println(F("Initial board"));
b.print();
b.make(m);
Serial.println(F("Board after e2e4"));
b.print();
b.unmake();
Serial.println(F("Board after unmake"));
b.print();
delay(1000);
}