package A3;

import java.util.ArrayList;
import java.util.Iterator;

public class DeckIteratorNoFace implements DeckIterator,Iterator<Card> {
	private StandardDeckImpl cards;
	
	public DeckIteratorNoFace(StandardDeckImpl cards){

		this.cards=cards;
	
		
	}
	
	@Override
	public boolean hasNext() {
		// TODO Auto-generated method stub
	
		if(cards.getTop()==null)return false;else return true;
		
	}

	@Override
	public Card next() {
		// TODO Auto-generated method stub
		if(!hasNext()){throw new RuntimeException("No next card.");}
		
		//currentIndex+=1;
		return cards.takeTop();
	}

	@Override
	public void remove() {
		// TODO Auto-generated method stub
		
	}

}
