Validates chess pieces moves (Ruby)