Package jbrickbreaker.model

Source Code of jbrickbreaker.model.Level0

package jbrickbreaker.model;

import java.awt.Color;

import jbrickbreaker.model.bonuses.SmallerPadBonus;

/**
*
* @author Christophe
*
*/
public class Level0 extends Level {
    public Level0(){
        int posX = 0;
        int posY = 50;

        posX+=8*Brick.WIDTH;
        bricks.add(new Brick(posX,posY));
        posX+=4*Brick.WIDTH;
        bricks.add(new Brick(posX,posY));
        posY+=2*Brick.HEIGHT;
        posX-=2*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.GRAY, new SmallerPadBonus(posX, posY)));
        posY+=2*Brick.HEIGHT;
        posX-=2*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.RED));
        posX+=4*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.RED));
        posY+=1*Brick.HEIGHT;
        posX-=3*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.RED));
        posX+=1*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.RED));
        posX+=1*Brick.WIDTH;
        bricks.add(new Brick(posX,posY,Color.RED));
    }
}
TOP

Related Classes of jbrickbreaker.model.Level0

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.