Use of c++ polymorphism for GameEntity instead of C style switch/cast