First attempt at porting Erlang code

Most of the code ported directly; the main difference is in the
deleteHit function. The other difference is that I chose to implement
game as a class, not an agent, because that simplifies the calling code.