refactoring: a bit cleaner legal move generator