Last active
May 16, 2019 08:10
-
-
Save ihrimech/a7faab64a2e3a27dd160efd28a22b53d to your computer and use it in GitHub Desktop.
A simple Human Actor with some reaction to the messages from the object HumanObjectMin.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Human extends Actor with ActorLogging { | |
override def receive: Receive = { | |
case Hello => log.info("Hello dear :)") | |
case HowAreYou => log.info("I'm fine dude, thanks for asking") | |
case HowIAm(happy) => | |
if (happy) log.info("I am Groot") | |
else log.info("Well, have a kitkat") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment