Improved enumeration of valid moves