public ArrayList<Piece> getPieces(boolean color)
	{
		ArrayList<Piece> answer = new ArrayList<Piece>();
		for(Piece[] pieces:theGrid)
		{
			for(Piece p : pieces)
			{
				if(p!=null&&p.isWhite()==color)
				{
					answer.add(p);
				}
			}
		}
		return answer;
	}