|
|
@ -39,6 +39,16 @@ public class Card extends JPanel { |
|
|
|
public int getNr() { |
|
|
|
return nr; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean isred() { |
|
|
|
return this.symbol == Symbol.Herz |
|
|
|
|| this.symbol == Symbol.Karo; |
|
|
|
} |
|
|
|
|
|
|
|
public boolean isblack() { |
|
|
|
return this.symbol == Symbol.Kreuz |
|
|
|
|| this.symbol == Symbol.Pik; |
|
|
|
} |
|
|
|
|
|
|
|
private String getNrText() { |
|
|
|
if (this.nr < 10) { |
|
|
@ -107,7 +117,7 @@ public class Card extends JPanel { |
|
|
|
g.setColor(Color.black); |
|
|
|
g.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1); |
|
|
|
|
|
|
|
if (this.symbol == Symbol.Herz || this.symbol == Symbol.Karo) |
|
|
|
if (this.isred()) |
|
|
|
g.setColor(Color.red); |
|
|
|
else |
|
|
|
g.setColor(Color.black); |
|
|
|