Finish the core of the board position parsing algorithm