% Demonstrate cell array of Die and TrickDie objects

n= 4;

for k= 1:n
    fprintf('%d\n', k)
    if rem(k,2)==1
        D{k}= Die();
    else
        D{k}= TrickDie(3,10);
    end
    disp(D{k})  % disp is overriden method; the type of the object in D{k}
                % determines which version of disp is called
end
