Added implementation for availableMoves.