Shifted much of the code from Player class into the common Entity class to be used by Monster class as well.