Question: JAVA: can you help me to understand how to get the xPos and yPos public void move (int xPos, int yPos) { while (this.body.getWidth() >
JAVA: can you help me to understand how to get the xPos and yPos
public void move (int xPos, int yPos) { while (this.body.getWidth() > 0) { this.head.setXPos(this.head.getXPos() + xPos or yPos); this.body.setXPos(this.body.getXPos() + xPos or yPos); this.leg.setXPos(this.leg.getXPos() + xPos or yPos); this.delay(20); } return; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
