so added doMove, undoMove.. and fixed some bugs with castling.