Asana interview question

Check if a BST is valid. How do you design a chess game?