Refactor Jump Game II