Greed Game with Scala