Exemplo n.º 1
0
 public Carta sortearCarta() throws Exception {
   if (baralho.QuantidadeCartas() < 0) throw new Exception("O baralho não possui mais cartas.");
   else return baralho.sortearCarta();
 }
Exemplo n.º 2
0
 public void embaralharCartas() {
   if (baralho.QuantidadeCartas() > 0) baralho.embaralharCartas();
 }