// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   Pentris.java

import java.awt.*;
import java.util.*;

class Piece
{

    Piece()
    {
        location = new Point();
        squares = new HashMap();
        color = Color.red;
    }

    public boolean moveIfAllowed(Point point, Board board)
    {
        for(Iterator iterator = squares.keySet().iterator(); iterator.hasNext();)
        {
            Point point1 = (Point)iterator.next();
            Point point2 = new Point(point1.x + location.x + point.x, point1.y + location.y + point.y);
            if(board.occupied(point2))
                return false;
        }

        location.translate(point.x, point.y);
        return true;
    }

    public void draw(Graphics g, boolean flag, Board board)
    {
        if(squares.isEmpty())
            return;
        int i = 10000;
        int j = 10000;
        int k = -10000;
        int l = -10000;
        Iterator iterator = squares.keySet().iterator();
        do
        {
            if(!iterator.hasNext())
                break;
            Point point = (Point)iterator.next();
            if(i > point.x)
                i = point.x;
            if(j > point.y)
                j = point.y;
            if(k < point.x)
                k = point.x;
            if(l < point.y)
                l = point.y;
        } while(true);
        iterator = squares.keySet().iterator();
        do
        {
            if(!iterator.hasNext())
                break;
            Point point1 = (Point)iterator.next();
            if(board == null || !board.skipRow(point1.y + location.y))
            {
                Point point2;
                if(flag)
                    point2 = new Point((int)(16D * ((double)(point1.x - i) + (double)(4 - (k - i)) / 2D)), (int)(16D * (4D - ((double)(point1.y - j) + (double)(4 - (l - j)) / 2D))));
                else
                    point2 = new Point(16 * (point1.x + location.x), 16 * (19 - point1.y - location.y));
                g.setColor(color);
                g.fillRect(point2.x, point2.y, 16, 16);
                switch(((Integer)squares.get(point1)).intValue())
                {
                case 1: // '\001'
                    g.setColor(Color.black);
                    g.fillOval(point2.x + 4, point2.y + 4, 7, 7);
                    break;

                case 2: // '\002'
                    g.setColor(Color.black);
                    g.fillRect(point2.x + 4, point2.y + 4, 8, 8);
                    g.setColor(Color.white);
                    g.fillRect(point2.x + 4 + 2, point2.y + 4 + 2, 4, 4);
                    break;

                case 3: // '\003'
                    g.setColor(Color.black);
                    g.fillOval(point2.x + 4, point2.y + 4, 7, 7);
                    g.setColor(Color.white);
                    g.fillOval(point2.x + 4 + 2, point2.y + 4 + 2, 3, 3);
                    g.setColor(Color.black);
                    g.fillOval(point2.x + 4 + 3, point2.y + 4 + 3, 1, 1);
                    break;
                }
                g.setColor(Color.black);
                int i1 = -1;
                while(i1 <= 1) 
                {
                    for(int j1 = -1; j1 <= 1; j1++)
                    {
                        if(i1 == 0 && j1 == 0)
                            continue;
                        Point point3 = new Point(point1);
                        point3.translate(i1, j1);
                        if(squares.containsKey(point3) && (board == null || !board.skipRow(point3.y + location.y)))
                            continue;
                        byte byte0 = 0;
                        byte byte1 = 0;
                        byte byte2 = 0;
                        byte byte3 = 0;
                        switch(i1)
                        {
                        case -1: 
                            byte0 = 0;
                            byte1 = 2;
                            break;

                        case 0: // '\0'
                            byte0 = 0;
                            byte1 = 16;
                            break;

                        case 1: // '\001'
                            byte0 = 14;
                            byte1 = 2;
                            break;
                        }
                        switch(j1)
                        {
                        case 1: // '\001'
                            byte2 = 0;
                            byte3 = 2;
                            break;

                        case 0: // '\0'
                            byte2 = 0;
                            byte3 = 16;
                            break;

                        case -1: 
                            byte2 = 14;
                            byte3 = 2;
                            break;
                        }
                        g.fillRect(point2.x + byte0, point2.y + byte2, byte1, byte3);
                    }

                    i1++;
                }
            }
        } while(true);
    }

    public boolean contains(Point point)
    {
        Point point1 = new Point(point.x - location.x, point.y - location.y);
        return squares.containsKey(point1);
    }

    public void addCounts(int ai[])
    {
        for(Iterator iterator = squares.keySet().iterator(); iterator.hasNext();)
        {
            Point point = (Point)iterator.next();
            ai[point.y + location.y]++;
        }

    }

    public void purgeRow(int i)
    {
        HashMap hashmap = new HashMap();
        Iterator iterator = squares.keySet().iterator();
        do
        {
            if(!iterator.hasNext())
                break;
            Point point = (Point)iterator.next();
            Point point1 = new Point(point);
            Point point2 = new Point(point.x + location.x, point.y + location.y);
            if(point2.y < i)
                hashmap.put(point1, squares.get(point));
            else
            if(point2.y > i)
            {
                point1.translate(0, -1);
                hashmap.put(point1, squares.get(point));
            }
        } while(true);
        squares = hashmap;
    }

    public static Vector buildGamePieceList()
    {
        Vector vector = new Vector();
        Piece piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(1));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(1));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(1));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(1));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 3;
        piece.location.y = 19;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(4, 0), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(2));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 3;
        piece.location.y = 19;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(4, 0), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(2));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(1));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(3));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(1));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 3;
        piece.location.y = 19;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(3, 0), new Integer(0));
        piece.squares.put(new Point(4, 0), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(1));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(2));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(3, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(1));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(0, 0), new Integer(2));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(1));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 16;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(1, 3), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 18;
        piece.squares.put(new Point(1, 0), new Integer(0));
        piece.squares.put(new Point(2, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(1, 1), new Integer(0));
        piece.squares.put(new Point(2, 1), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 4;
        piece.location.y = 17;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(1, 2), new Integer(0));
        piece.squares.put(new Point(2, 2), new Integer(0));
        vector.add(piece);
        piece = new Piece();
        piece.location.x = 5;
        piece.location.y = 15;
        piece.squares.put(new Point(0, 0), new Integer(0));
        piece.squares.put(new Point(0, 1), new Integer(0));
        piece.squares.put(new Point(0, 2), new Integer(0));
        piece.squares.put(new Point(0, 3), new Integer(0));
        piece.squares.put(new Point(0, 4), new Integer(0));
        vector.add(piece);
        return vector;
    }

    Point location;
    HashMap squares;
    Color color;
    static final int BORDER = 2;
    static final int INF = 10000;
}
