package engine;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;

public class MoveLog implements Iterable<MoveLogEntry> {
    private List <MoveLogEntry> moveLogEntries;

    public MoveLog() {
        moveLogEntries = new ArrayList<>();
    }

    public void add(MoveLogEntry moveLogEntry) {
        moveLogEntries.add(moveLogEntry);
    }

    public MoveLogEntry get(int id) {
        return moveLogEntries.get(id);
    }

    public int size() {
        return moveLogEntries.size();
    }

    @Override
    public Iterator<MoveLogEntry> iterator() {
        return moveLogEntries.iterator();
    }
}