removed duplicated code and added documentation in game entity