Changed space action to reflect better OO concepts

Made spaceaction take a player as a parameter and then performs an
action directly on the player.