/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package jmazzodicarte; import java.util.*; /** * * @author gabriele */ public class MazzoCarte { public ArrayList el = new ArrayList(); public MazzoCarte(){ for (Seme s : Seme.values()){ for (int i=1; i <= 10; i++) el.add(new Carta(i,s)); } } public void mischia(){ Collections.shuffle(el); } public void ordina(){ Collections.sort(el); } @Override public String toString(){ String s=""; for (Carta c : el){ s = s + c+ "\n"; } return s; } }