Refactoring code in Rocket sprite