adding kevin's code for proper turn based moves, preventing user from putting themself in check