public class Spielbildschirm extends MouseAdapter implements Bilder,Runnable,ActionListener, Konstanten{
private int spieleranzahl;
public Spieler[] spieler;
private int playercount = 1;
private JFrame brett = new JFrame();
private JPanel aktionFeld = new JPanel();
private JPanel friedhof;
private JButton beenden;
private ArrayList<Object> deck = new ArrayList<Object>();
public static int rabatt = 0;
// Spielbereich
private JPanel handkarten = new JPanel(new GridLayout(1,0));
private JPanel nz;
private JPanel abl;
private JPanel tischmitte = new JPanel(new GridLayout(1,0));
private JPanel bank;
private JLabel nzLabel;
private JButton ablButton;
private JButton bankButton;
// Listen Spielbereich
private List<Object> listeHand = new ArrayList<>();
private List<Object> listeAbl = new ArrayList<>();
private List<Object> listeFried = new ArrayList<>();
private List<Object> listeTischmitte = new ArrayList<>();
// Aktionsfeld
private JLabel aktionKauf = new JLabel();
private JLabel aktionZug = new JLabel();
private JLabel aktionGeld = new JLabel();
private JLabel aktionMuenze = new JLabel();
static int kauf = 20;
static int zug = 1;
static int geld = 1;
static int muenze = 0;
// hier noch weitere Variablen wegen Länge entfernt
public Spielbildschirm(int spieleranzahl,ArrayList<String> deck,boolean einAbenteuer) {
this.spieleranzahl = spieleranzahl;
if(this.spieleranzahl <= 2) trollanzahl = 10;
else trollanzahl = 20 - spieleranzahl;
knutanzahl = (24 - (spieleranzahl*4));
this.spieler = new Spieler[spieleranzahl];
//Aktionsfeld
aktionFeld.setLayout(null);
aktionFeld.setBounds(20,325,110,120);
aktionKauf.setBounds(20,0,100,30);
aktionZug.setBounds(20,30,100,30);
aktionGeld.setBounds(20,60,100,30);
aktionMuenze.setBounds(20,90,100,30);
aktionFeld.add(aktionKauf);
aktionFeld.add(aktionZug);
aktionFeld.add(aktionGeld);
aktionFeld.add(aktionMuenze);
aktionFeld.add(new Leinwand(0,0,(ImageIcon)pics[21],NORMAL));
aktionFeld.setOpaque(false);
// Vorrattsstapel implementieren
plus2Stapel = new Leinwand(250, 63,229, 345, null, MITTEL);
plus2Stapel.setLayout(new CardLayout());
plus2.setLayout(null);
initJLabel(plus2count, 365, 63, 20, 20);
plus1Stapel = new Leinwand(408, 63, 229, 345, null, MITTEL);
plus1Stapel.setLayout(new CardLayout());
plus1.setLayout(null);
initJLabel(plus1count, 523, 63, 20, 20);
plus0Stapel = new Leinwand(566, 63, 229, 345, null, MITTEL);
plus0Stapel.setLayout(new CardLayout());
plus0.setLayout(null);
initJLabel(plus0count, 681, 63, 20, 20);
minus1Stapel = new Leinwand(724, 63, 229, 345, null, MITTEL);
minus1Stapel.setLayout(new CardLayout());
minus1.setLayout(null);
initJLabel(minus1count, 839, 63, 20, 20);
// Spielbereich
nz = new Leinwand(258, 650,229, 345,(ImageIcon)basis[28], KLEIN);
abl = new Leinwand(258, 525,229, 345, null, KLEIN);
handkarten.setBounds(345, 595,405,200);
friedhof = new Leinwand(792,600,200,133,null,NORMAL);
tischmitte = new Leinwand(275,343,468,176,null,NORMAL);
tischmitte.setLayout(new GridLayout(1,0));
bank = new Leinwand(165,677,229,345,null,WINZIG);
initJLabel(nzCount,238,650,20,20);
initJLabel(ablCount,238,525,20,20);
initJLabel(friedCount,992,600,20,20);
// Init Vorrat Seite
knutStapel = new Leinwand(16, 14, 229, 345, null, KLEIN);
knutStapel.setLayout(new CardLayout());
knutButton.setLayout(null);
initJLabel(knutcount, 95, 14, 20, 20);
groStapel = new Leinwand(128, 14, 229, 345, null, KLEIN);
groStapel.setLayout(new CardLayout());
groButton.setLayout(null);
initJLabel(grocount, 208, 14, 20, 20);
randStapel = new Leinwand(16, 150, 229, 345, null, KLEIN);
randStapel.setLayout(new CardLayout());
randButton.setLayout(null);
initJLabel(randcount, 95, 149, 20, 20);
trollStapel = new Leinwand(128, 150, 229, 345, null, KLEIN);
trollStapel.setLayout(new CardLayout());
trollButton.setLayout(null);
initJLabel(trollcount, 208, 149, 20, 20);
//BeendenButton
beenden = new JButton(pics[18]);
beenden.setBounds(984,15,pics[18].getIconWidth(),pics[18].getIconHeight());
beenden.setToolTipText("Spiel verlassen !!!");
beenden.addActionListener(this);
beenden.setActionCommand("beenden");
brett.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
brett.setLayout(null);
JLabel hintergrund = new JLabel(back[1]);
hintergrund.setSize(back[1].getIconWidth(), back[1].getIconHeight());
brett.setUndecorated(true);
brett.setSize(hintergrund.getMaximumSize());
aufbauen(deck,einAbenteuer);
updateAktionFeld();
brett.add(plus2Stapel);
brett.add(plus1Stapel);
brett.add(plus0Stapel);
brett.add(minus1Stapel);
brett.add(trollStapel);
brett.add(knutStapel);
brett.add(groStapel);
brett.add(randStapel);
brett.add(aktionFeld);
brett.add(bank);
brett.add(tischmitte);
brett.add(friedhof);
brett.add(beenden);
brett.add(handkarten);
brett.add(nz);
brett.add(abl);
brett.add(hintergrund);
brett.setVisible(true);
}
// Erstellt den ersten Spielbildschirm und teilt Karten von Spieler 1 aus
private void aufbauen(ArrayList<String> deck,boolean einAbenteuer){
createMitteVorrat(deck,einAbenteuer);
createSeitenVorrat();
spielerGenerieren(spieleranzahl);
aktuellerPlayer(playercount).takeTopCardOfNz(3);
updateSpielerKarten(playercount);
updateStapelSize();
}
// Listen Vorrat Mitte erstellen
private void createMitteVorrat(ArrayList<String> deck, boolean einAbenteuer){
// Deck mischen
// hier wird deck befüllte wegen Länge entfernt
//############ BURGHOF ##########################################
}
Collections.shuffle(this.deck);
// Hilfslisten
List<Object> hilfe1 = new ArrayList<Object>();
List<Object> hilfe2 = new ArrayList<Object>();
List<Object> hilfe3 = new ArrayList<Object>();
List<Object> hilfe4 = new ArrayList<Object>();
hilfe1 = this.deck.subList(0, 28);
hilfe2 = this.deck.subList(28, 50);
hilfe3 = this.deck.subList(50, 68);
hilfe4 = this.deck.subList(68, 80);
listeMinus1.addAll(hilfe1);
listePlus0.addAll(hilfe2);
listePlus1.addAll(hilfe3);
listePlus2.addAll(hilfe4);
plus2.add(new Leinwand(0,0,((Card)listePlus2.get(listePlus2.size()-1)).getIMG(),MITTEL));
plus2.setActionCommand("plus2");
plus2.addActionListener(this);
plus1.add(new Leinwand(0,0,((Card)listePlus1.get(listePlus1.size()-1)).getIMG(),MITTEL));
plus1.setActionCommand("plus1");
plus1.addActionListener(this);
plus0.add(new Leinwand(0,0,((Card)listePlus0.get(listePlus0.size()-1)).getIMG(),MITTEL));
plus0.setActionCommand("plus0");
plus0.addActionListener(this);
minus1.add(new Leinwand(0,0,((Card)listeMinus1.get(listeMinus1.size()-1)).getIMG(),MITTEL));
minus1.setActionCommand("minus1");
minus1.addActionListener(this);
plus2Stapel.add(plus2);
plus1Stapel.add(plus1);
plus0Stapel.add(plus0);
minus1Stapel.add(minus1);
}
private void createSeitenVorrat(){
//Knutstapel
for(int i = 0; i < knutanzahl;i++){
G1 c = new G1();
listeKnut.add(c);
}
knutButton.setName("G1");
knutButton.setActionCommand(knutButton.getName());
knutButton.addActionListener(this);
knutButton.add(new Leinwand(0,0,((Card)listeKnut.get(listeKnut.size()-1)).getIMG(),KLEIN));
knutStapel.add(knutButton);
//Grostapel
for(int i = 0; i < groanzahl;i++){
G2 c = new G2();
listeGro.add(c);
}
groButton.setName("G2");
groButton.setActionCommand(groButton.getName());
groButton.addActionListener(this);
groButton.add(new Leinwand(0,0,((Card)listeGro.get(listeGro.size()-1)).getIMG(),KLEIN));
groStapel.add(groButton);
//Randstapel
for(int i = 0; i < randanzahl;i++){
G3 c = new G3();
listeRand.add(c);
}
randButton.setName("G3");
randButton.setActionCommand(randButton.getName());
randButton.addActionListener(this);
randButton.add(new Leinwand(0,0,((Card)listeRand.get(listeRand.size()-1)).getIMG(),KLEIN));
randStapel.add(randButton);
//Trollstapel
for(int i = 0; i < trollanzahl;i++){
T c = new T();
listeTroll.add(c);
}
trollButton.setName("T");
trollButton.setActionCommand(trollButton.getName());
trollButton.addActionListener(this);
trollButton.add(new Leinwand(0,0,((Card)listeTroll.get(listeTroll.size()-1)).getIMG(),KLEIN));
trollStapel.add(trollButton);
updateTipInfo(rabatt);
}
public void showAbl(Spieler sp){
if(sp != null)
listeAbl.clear();
listeAbl.addAll(sp.getAblage());
abl.removeAll();
abl.setVisible(false);
if(listeAbl.size()>0)
abl.add(new Leinwand(0,0,((Card)listeAbl.get(listeAbl.size()-1)).getIMG(),KLEIN));
abl.repaint();
ablAnzahl = ((sp.getAblage().size()));
abl.setVisible(true);
}
private void showTischmitte(List<Object> listeTischmitte) {
// zeigt ausgespielte Karten an
if(tischmitte != null){
tischmitte.removeAll();
tischmitte.setVisible(false);
tischmitte.setBackground(new Color(0,0,0,0));
for(int i = 0; i < listeTischmitte.size();i++){
JLabel label = new JLabel();
label.setBackground(new Color(0,0,0,0));
label.setOpaque(true);
label.setLayout(null);
label.add(new Leinwand(0,0,((Card)listeTischmitte.get(i)).getIMG(),MITTEL));
tischmitte.add(label);
tischmitte.setVisible(true);
}
}
}
public void showHandkarten(Spieler sp){
// zeigt vorhandene Handkarten an
if(sp != null){
listeHand.clear();
listeHand.addAll(sp.getHand());
handkarten.removeAll();
handkarten.setVisible(false);
handkarten.setLayout(new GridLayout(1,0));
handkarten.setBackground(new Color(0,0,0,0));
for(int i = 0; i < listeHand.size();i ++){
JLabel button = new JLabel();
button.setBackground(new Color(0,0,0,0));
button.setName(Integer.toString(i));
button.addMouseListener(this);
button.setLayout(null);
button.add(new Leinwand(0,0,((Card)listeHand.get(i)).getIMG(),MITTEL));
handkarten.add(button);
handkarten.setVisible(true);
}
nzAnzahl = ((sp.getNz().size()));
}
}
private void updateHandkarten(Spieler sp){
sp.setHand(listeHand);
}
public void updateKnutStapel(){
knutanzahl = listeKnut.size();
knutButton.removeAll();
if(knutanzahl > 0){
knutStapel.removeAll();
knutButton.setActionCommand("G1");
knutButton.add(new Leinwand(0,0,((Card)listeKnut.get(listeKnut.size()-1)).getIMG(),KLEIN));
knutStapel.add(knutButton);
}
else
knutStapel.setVisible(false);
}
public void updateGroStapel(){
groanzahl = listeGro.size();
groButton.removeAll();
if(groanzahl > 0){
groStapel.removeAll();
groButton.setActionCommand("G2");
groButton.add(new Leinwand(0,0,((Card) listeGro.get(listeGro.size()-1)).getIMG(),KLEIN));
groStapel.add(groButton);
}
else
groStapel.setVisible(false);
}
public void updateRandStapel(){
randanzahl = listeRand.size();
randButton.removeAll();
if(randanzahl > 0){
randStapel.removeAll();
randButton.setActionCommand("G3");
randButton.add(new Leinwand(0,0,((Card) listeRand.get(listeRand.size()-1)).getIMG(),KLEIN));
randStapel.add(randButton);
}
else
randStapel.setVisible(false);
}
public void updateTrollStapel(){
trollanzahl = listeTroll.size();
trollButton.removeAll();
if(trollanzahl > 0){
trollStapel.removeAll();
trollButton.setActionCommand("T");
trollButton.add(new Leinwand(0,0,((Card) listeTroll.get(listeTroll.size()-1)).getIMG(),KLEIN));
trollStapel.add(trollButton);
}
else
trollStapel.setVisible(false);
}
private void spielerGenerieren(int spieleranzahl){
// Spieler generieren entsprechend Spieleranzahl
for(int i = 0; i < spieleranzahl;i++){
spieler[i] = new Spieler((i+1));
}
}
private void updateStapelSize(){
if(ablAnzahl > 99)ablCount.setFont(Startmenu.fontSchriftSize(11));
knutanzahl = listeKnut.size();
groanzahl = listeGro.size();
randanzahl = listeRand.size();
trollanzahl = listeTroll.size();
plus2anzahl = listePlus2.size();
plus1anzahl = listePlus1.size();
plus0anzahl = listePlus0.size();
minus1anzahl = listeMinus1.size();
grocount.setText(Integer.toString(groanzahl));
knutcount.setText(Integer.toString(knutanzahl));
randcount.setText(Integer.toString(randanzahl));
trollcount.setText(Integer.toString(trollanzahl));
plus2count.setText(Integer.toString(plus2anzahl));
plus1count.setText(Integer.toString(plus1anzahl));
plus0count.setText(Integer.toString(plus0anzahl));
minus1count.setText(Integer.toString(minus1anzahl));
nzCount.setText(Integer.toString(nzAnzahl));
ablCount.setText(Integer.toString(ablAnzahl));
}
public void update(){
updateStapel();
updateAktionFeld();
updateSpielerKarten(playercount);
updateStapelSize();
}
public void updateStapel() {
// aktualisiert die 4 Vorratsstapel
updatePlus2();
updatePlus1();
updatePlus0();
updateMinus1();
// aktualisiert den Seitenvorrat
updateKnutStapel();
updateGroStapel();
updateRandStapel();
updateTrollStapel();
// aktualisiert die Hoverinfo
updateTipInfo(rabatt);
}
private void updateMinus1() {
// aktualisiert Minus1 Stapel
minus1anzahl = listeMinus1.size();
minus1.removeAll();
if(minus1anzahl > 0){
minus1Stapel.removeAll();
minus1.setActionCommand("minus1");
minus1.add(new Leinwand(0,0,((Card)listeMinus1.get(listeMinus1.size()-1)).getIMG(),MITTEL));
minus1Stapel.add(minus1);
}
else
minus1Stapel.setVisible(false);
}
private void updatePlus0() {
// aktualisiert Plus0 Stapel
plus0anzahl = listePlus0.size();
plus0.removeAll();
if(plus0anzahl > 0){
plus0Stapel.removeAll();
plus0.setActionCommand("plus0");
plus0.add(new Leinwand(0,0,((Card)listePlus0.get(listePlus0.size()-1)).getIMG(),MITTEL));
plus0Stapel.add(plus0);
}
else
plus0Stapel.setVisible(false);
}
private void updatePlus1() {
// aktualisiert Plus1 Stapel
plus1anzahl = listePlus1.size();
plus1.removeAll();
if( plus1anzahl > 0){
plus1Stapel.removeAll();
plus1.setActionCommand("plus1");
plus1.add(new Leinwand(0,0,((Card)listePlus1.get(listePlus1.size()-1)).getIMG(),MITTEL));
plus1Stapel.add(plus1);
}
else
plus1Stapel.setVisible(false);
}
public void updatePlus2() {
// aktualisiert Plus2 Stapel
plus2anzahl = listePlus2.size();
plus2.removeAll();
if( plus2anzahl > 0){
plus2Stapel.removeAll();
plus2.setActionCommand("plus2");
plus2.add(new Leinwand(0,0,((Card)listePlus2.get(listePlus2.size()-1)).getIMG(),MITTEL));
plus2Stapel.add(plus2);
}
else
plus2Stapel.setVisible(false);
}
// Zeigt die aktuelen Kartenkosten inkl. rabatt durch Kronjuwelen an
public void updateTipInfo(int rabatt){
int preisKnutstapel = (Integer)((listeKnut.size()> 0)?((Card)listeKnut.get(listeKnut.size()-1)).getPreis() - rabatt:0);
int preisGrostapel = (Integer)((listeGro.size()> 0)?((Card)listeGro.get(listeGro.size()-1)).getPreis()- rabatt:0);
int preisRandstapel = (Integer)((listeRand.size()> 0)?((Card)listeRand.get(listeRand.size()-1)).getPreis()- rabatt:0);
int preisTrollstapel = (Integer)((listeTroll.size()> 0)?((Card)listeTroll.get(listeTroll.size()-1)).getPreis()- rabatt:0);
int preisPlus2stapel =(Integer)((listePlus2.size()> 0)? 2 + ((Card)listePlus2.get(listePlus2.size()-1)).getPreis()- rabatt:0);
int preisPlus1stapel = (Integer)((listePlus1.size()> 0)?1 + ((Card)listePlus1.get(listePlus1.size()-1)).getPreis()- rabatt:0);
int preisPlus0stapel = (Integer)((listePlus0.size()> 0)?((Card)listePlus0.get(listePlus0.size()-1)).getPreis()- rabatt:0);
int preisMinus1stapel = (Integer)((listeMinus1.size()> 0)?-1 + ((Card)listeMinus1.get(listeMinus1.size()-1)).getPreis()- rabatt:0);
if(preisKnutstapel < 0)preisKnutstapel = 0;
if(preisGrostapel < 0)preisGrostapel = 0;
if(preisRandstapel < 0)preisRandstapel = 0;
if(preisTrollstapel < 0)preisTrollstapel = 0;
if(preisPlus2stapel < 0)preisPlus2stapel = 0;
if(preisPlus1stapel < 0)preisPlus1stapel = 0;
if(preisPlus0stapel < 0)preisPlus0stapel = 0;
if(preisMinus1stapel < 0)preisMinus1stapel = 0;
knutButton.setToolTipText("Kosten: " + (Integer.toString(preisKnutstapel))+" GE");
groButton.setToolTipText("Kosten: " + (Integer.toString(preisGrostapel))+" GE");
randButton.setToolTipText("Kosten: " + (Integer.toString(preisRandstapel))+" GE");
trollButton.setToolTipText("Kosten: " + (Integer.toString(preisTrollstapel))+" GE");
plus2.setToolTipText("Kosten: " + (Integer.toString(preisPlus2stapel))+" GE");
plus1.setToolTipText("Kosten: " + (Integer.toString(preisPlus1stapel))+" GE");
plus0.setToolTipText("Kosten: " + (Integer.toString(preisPlus0stapel))+" GE");
minus1.setToolTipText("Kosten: " + (Integer.toString(preisMinus1stapel))+" GE");
}
//Gibt den aktuellen Spieler zurück
public Spieler aktuellerPlayer(int playercount){
int aktuellerspieler;
if(playercount > spieleranzahl)playercount = 1;
aktuellerspieler = playercount-1;
return spieler[aktuellerspieler];
}
private void updateSpielerKarten(int playercount){
showHandkarten(spieler[playercount-1]);
showTischmitte(listeTischmitte);
showAbl(spieler[playercount-1]);
}
@Override
public void run() {
// not used
}
@Override
public void actionPerformed(ActionEvent ae) {
if(ae.getActionCommand().equals("beenden")){
brett.dispose();
Startmenu.fontSchriftSize(16);
}
if(ae.getActionCommand().equals("G1")){
aktuellerPlayer(playercount).newCard(listeKnut.get(listeKnut.size()-1));
listeKnut.remove(listeKnut.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("G2")){
aktuellerPlayer(playercount).newCard(listeGro.get(listeGro.size()-1));
listeGro.remove(listeGro.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("G3")){
aktuellerPlayer(playercount).newCard(listeRand.get(listeRand.size()-1));
listeRand.remove(listeRand.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("T")){
aktuellerPlayer(playercount).newCard(listeTroll.get(listeTroll.size()-1));
listeTroll.remove(listeTroll.size()-1);
kauf--;
update();
}
// Stapelaction
if(ae.getActionCommand().equals("plus2")){
aktuellerPlayer(playercount).newCard(listePlus2.get(listePlus2.size()-1));
listePlus2.remove(listePlus2.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("plus1")){
aktuellerPlayer(playercount).newCard(listePlus1.get(listePlus1.size()-1));
listePlus1.remove(listePlus1.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("plus0")){
aktuellerPlayer(playercount).newCard(listePlus0.get(listePlus0.size()-1));
listePlus0.remove(listePlus0.size()-1);
kauf--;
update();
}
if(ae.getActionCommand().equals("minus1")){
aktuellerPlayer(playercount).newCard(listeMinus1.get(listeMinus1.size()-1));
listeMinus1.remove(listeMinus1.size()-1);
kauf--;
update();
}
// testStapel(listeTischmitte);
}
private void initJLabel(JLabel label, int x,int y, int xs, int ys){
if(label==knutcount)knutcount.setText(Integer.toString(knutanzahl));
if(label==grocount)grocount.setText(Integer.toString(groanzahl));
if(label==randcount)randcount.setText(Integer.toString(randanzahl));
if(label==trollcount)trollcount.setText(Integer.toString(trollanzahl));
if(label==nzCount)nzCount.setText(Integer.toString(nzAnzahl));
if(label==ablCount)ablCount.setText(Integer.toString(ablAnzahl));
label.setHorizontalAlignment(JLabel.CENTER);
label.setOpaque(true);
label.setBackground(Color.ORANGE);
label.setForeground(Color.BLACK);
label.setFont(Startmenu.toll);
label.setBounds(x,y,xs,ys);
brett.add(label);
}
private void updateAktionFeld(){
/* if(kauf < 1){
plus2.setEnabled(false);
plus1.setEnabled(false);
plus0.setEnabled(false);
minus1.setEnabled(false);
knutButton.setEnabled(false);
groButton.setEnabled(false);
randButton.setEnabled(false);
trollButton.setEnabled(false);
}
*/
aktionKauf.setText("Käufe : " + Integer.toString(kauf));
aktionZug.setText("Züge : " + Integer.toString(zug));
aktionGeld.setText("Geldzüge : " + Integer.toString(geld));
aktionMuenze.setText("Münzen : " + Integer.toString(muenze));
}
public void testStapel(List<Object> stapel){
for(int i = 0; i < stapel.size(); i++)
System.out.println(((Card)stapel.get(i)).getName());
System.out.println(stapel.size());
System.out.println();
}
// handle Handkarten
public void mouseClicked(MouseEvent event) {
// Waehle geklickte Karte
int postionHandkarte = Integer.parseInt(((JLabel)event.getSource()).getName());
for(int i = 0; i < listeHand.size();i++){
if (listeHand.indexOf((listeHand.get(i)))== postionHandkarte){
Card c = new Card();
c = (Card) listeHand.get(i);
// pruefe ob du Zuege hast ODER Karte eine Geldkarte ist UND du noch Geldzuege hast
if((zug > 0 )|| (((Card)c).getName().startsWith("G")&& geld > 0 )){
// reduziere zuege bzw. geldzuege
if(c instanceof Money && geld > 0){
geld--;
action((Card)c);
}// TODO HIER ändert sich der gesetzte Wert wieder in den Ausganzwert beim debuggen!!!!
else zug--;
// lege Karte in Tischmitte
listeTischmitte.add(listeHand.remove(i));
// rufe Action der Karte auf
}
}
}
updateHandkarten(aktuellerPlayer(playercount));
update();
}
public void action(Card karte ){
if(karte instanceof T)
karte.action(karte,listeTischmitte,listeHand);
else
karte.action();
}
// Setter
public void setMuenze(int muenze){
Spielbildschirm.muenze = muenze;
}
public void setKauf(int kauf) {
Spielbildschirm.kauf = kauf;
}
// Getter
public int getMuenze(){return Spielbildschirm.muenze;}
public int getKauf() {return kauf;}
}