You aren't assigning BUTTON to B, so what you're doing won't work. Even if you did, you are not doing anything with X and Y, which makes the effects of the buttons completely unnoticeable. Also, by assigning a constant value to X and Y in each instance of the loop, you're essentially constantly resetting their values, which means that increasing/decreasing their values by 1 won't do much.