Allows for checking and handling of invalid moves