public Breakout() { top = new Wall(0, -5, 800, 10); left = new Wall(-5, 0, 10, 640); right = new Wall(795, 0, 10, 640); bottom = new Wall(0, 610, 800, 10); keys = new boolean[2]; score = 0; lives = 5; ball = new Ball(400, 500); ball.setXSpeed(2); ball.setYSpeed(-2); paddle = new Paddle(400, 595, 100, 10, 5); bricks = getBricks("lvlTwo.txt"); setBackground(Color.WHITE); setVisible(true); new Thread(this).start(); addKeyListener(this); // starts the key thread to log key strokes }
public OuterSpace() { m = new Menu(this); screen = "gamepage"; setupgamepage(); setVisible(true); }