@Override
	public Iterator<Piece> iterator() {
		return new IteratorOnPieces(){
			
			private int row,column;

			@Override
			public boolean hasNext() {
				int start = column;
				for (int r=row; r<8;r++){
					for(int c=start; c<8;c++)
						if(!isEmpty(new Position(r,c)))
							return true;
					start = 0;
				}
				return false;
			}

			@Override
			public Piece next() {
				int start = column;
				for (int r=row; r<8;r++){
					for(int c=start; c<8;c++){
						if(!isEmpty(new Position(r,c))){
							if(c==7){
								row=r+1;
								column=0;
								}
							else{
							column=c+1;
							row=r;
							}
							return getPiece(new Position(r,c));
						}
					}
					start=0;
				} 
				return null;
			}

			@Override
			public void remove() {
				// TODO Auto-generated method stub
				
			}
			
			/**
			 * Crea il clone.
			 */
			public Iterator<Piece> clone() {
				try{
				return (Iterator<Piece>) super.clone();
				}
				catch(Exception e){return null;}
			}

			@Override
			public Position getPosition() {
				if (column!=0)
					return new Position(row,column-1);
				return new Position(row-1,7);
			}
			
		};
	}