bare game logic engine in Erlang