Class Shape

java.lang.Object
  |
  +--Shape

public class Shape
extends java.lang.Object

A Shape is a 2-dimensional bit vector defining the unit squares occupied by a piece or a box.


Constructor Summary
Shape(NumberSource nums)
          Read a Shape specification from a NumberSource.
 
Method Summary
 int height()
          What is this shape's height?
 boolean occupies(int x, int y)
          Does this shape occupy square x, y?
 void print()
           
 int width()
          What is this shape's width?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shape

public Shape(NumberSource nums)
      throws java.io.IOException
Read a Shape specification from a NumberSource.
Method Detail

width

public int width()
What is this shape's width?

height

public int height()
What is this shape's height?

occupies

public boolean occupies(int x,
                        int y)
Does this shape occupy square x, y?

print

public void print()