public class ExampleGameCanvas extends GameCanvas implements Runnable { private boolean isPlay. // Game Loop runs when isPlay is true private long delay. // To give thread consistency private int currentX, currentY. // To hold current position of the ’X’ private int width. // To hold screen width private int height. // To hold screen height