object Actions { | |
import MISU.Domain._ | |
def getBandLeaderName(jazzBand: JazzBand) = | |
jazzBand match { | |
case PianoTrio(PianoPlayer(pianoPlayerName), _, _) => pianoPlayerName | |
case Quartet(TrumpetPlayer(trumpetPlayerName), _, _, _) => trumpetPlayerName | |
case Quintet(SaxPlayer(saxPlayerName), _, _, _, _) => saxPlayerName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment