I want the variable curr_pos_x and curr_pos_y to hold the updated values of the player but whenever i press any up/down/left/down key the second time the position is set to