updated player.js and sprite.js