Thank you the worse just was because I hadn't implemented full chess and left out castling, en passant, pawn progression and detection of check.