Skip to content

Instantly share code, notes, and snippets.

@kubukoz
Created April 12, 2018 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubukoz/e6d07b1b7eaf63ce4bd9112b5093edc8 to your computer and use it in GitHub Desktop.
Save kubukoz/e6d07b1b7eaf63ce4bd9112b5093edc8 to your computer and use it in GitHub Desktop.
sealed trait GameCreationError extends Product with Serializable
object GameCreationError {
case class NameTooShort(min: Int) extends GameCreationError
case class NameTooLong(max: Int) extends GameCreationError
case class PlatformNotFound(platformSlug: String) extends GameCreationError
case class PlayersFromTooLow(min: Int) extends GameCreationError
case object PlayersToSmallerThanFrom extends GameCreationError
case object NameNotUnique extends GameCreationError
case object NoPlatformsSupplied extends GameCreationError
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment