// From A Beginning Programmer's Guide to Java
// At http://beginwithjava.blogspot.com/

// Used in the articles 'Multiple Constructor Methods'
// at http://beginwithjava.blogspot.com/2010/08/multiple-constructor-methods.html
// and 'Simple Collision Detection in Java'
// at http://beginwithjava.blogspot.com/2010/08/simple-collision-detection-in-java.html

import java.awt.*;

// A Simple class for use in the simple video game examples.
// Mark Graybill, Aug. 2010

public class Brick extends Rectangle{
 Color brickColor;

 public Brick(int newX, int newY, int newWidth, int newHeight){
  super(newX, newY, newWidth, newHeight);
  brickColor = new Color(0, 128, 255);
 }

 public Brick(int newX, int newY){
  this(newX, newY, 10, 10);
 }

 public Brick(){
  this(0,0,10,10);
 }

 public void setColor(Color newColor){ brickColor=newColor; }
 public Color getColor(){ return brickColor; }

} // End Brick