if you're in check, you can only move a piece if it gets you out of check