Event based scala game engine