Initial commit of the chess logic.