Skip to content

Instantly share code, notes, and snippets.

@priort

priort/JazzBandsActions.scala Secret

Created Dec 30, 2018
Embed
What would you like to do?
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
You can’t perform that action at this time.