Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Creates a basic Brick object at a specified position. The new Brick will default with a strength of 3,
- * meaning that it will break after 3 hits by a ball.
- * @param topIn The y position of the top of this Brick in the model.
- * @param leftIn The x position of the left side of this Brick in the model.
- */
- public Brick(int topIn, int leftIn)
- {
- }
- /**
- * Creates a custom Brick object at a specified position with a specified strength.
- * @param topIn The y position of the top of this Brick in the model.
- * @param leftIn The x position of the left side of this Brick in the model.
- * @param hitsIn The initial strength of this Brick. A value greater than zero represents that this Brick +
- * will break after that number of hits. A value of 0 represents a "non-brick" or empty space in the model.
- * A value of -1 represents that this Brick cannot be broken at all, regardless of the number of hits.
- */
- Brick(int topIn, int leftIn, int hitsIn)
- {
- }
- /**
- * The current color to represent this Brick's breakability state.
- * @return There are five possible Colors that can be returned based on the Brick's current strength:
- * Color.BLACK if this Brick cannot be broken; Color.WHITE if this Brick has been completely broken;
- * and Color.RED, Color.YELLOW, Color. GREEN if this Brick will break after 1, 2, and 3 more hits,
- * consecutively.
- */
- public javafx.scene.paint.Color getColor()
- {
- Color color = null;
- return color;
- }
- /**
- * This mutator method will update this Brick's state data to account for being hit by the Ball once.
- * @return true when the hit caused this brick to break completely, false otherwise.
- */
- public boolean hit()
- {
- return false;
- }
- /**
- * This method implements a collision detection algorithm to identify whether this Brick is currently being
- * hit by a given Ball object. It will produce a return value to signal which side, if any, is currently
- * being hit.
- * @param theBall The Ball to examine for collision with this Brick.
- * @return A valid TouchPosition state representing where theBall is intersecting this Brick. When no collision
- * is detected at all or this Brick is already broken, NONE should be returned. Otherwise, TOP, BOTTOM,
- * LEFT, or RIGHT will be returned corresponding to which side of this Brick is currently being hit by theBall.
- */
- public TouchPosition isTouching(Ball theBall)
- {
- return null;
- }
- /**
- * Retrieves a String representation of this Brick's current object state. The string will be formatted as:
- * "Brick at (tlx, tly, brx, bry)" where tlx/tly are the x and y coordinates of the top/left corner and brx/bry
- * are the x and y coordinates of the bottom right corner of this Brick.
- * @return The formatted state information about this Brick.
- */
- public java.lang.String toString()
- {
- return null;
- }
Add Comment
Please, Sign In to add comment