Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

1

15.06.2009, 19:44

würde mich über Hilfe sehr freuen.[Gelöst]

Hallo. Als erstes möchte ich mich mal vorstellen: Ich bin der Alexander und Studiere Informatik an der TU Graz. Programmiere seit ca einem halbem Jahr in C++ und habe ne menge Motivation und Begeisterung für das Programmieren.

Ich schreiben auch seit ca 2 Monaten an meinem ersten eigenen Projekt, welches ein simples Poker spiel ist. das ganze in C++.
und genau da kommt jetzt mein problem.

Vorerst habe ich eine graphikausgabe mit SVG images realisiert, die der Browser dann anzeigt und die Seite aktualisiert sich ständig.

Ok jetzt das Problem:
Ich habe 2 Vektoren mit string für Siuts und Werte der Karten. Und dan wird halt per rand() eine Zufallskarte gemacht und diese bekommt dann der Spieler. die Ausgabe in der Shell geht ja also alles klar. Jetzt habe ich wie gesagt auch eine Klasse svgdoc, die mir halt dann in wiederum 2 Vektoren mit strings, welche zu den vorgefertigten gif Bildern zeigen und diese Vectoren sind gleich mit denen die Strings halten.

Wenn ich eine Runde druchspiele, stimmt alles. Shell und SVG sind die Gleichen Karten und alles geht supi ABER wenn ich dann nach dem ersten Showdown in die zweite Runde komme, dann stimmen die Karten der Spieler von der Shell und den Bildern nicht überein. Spieler 1 hat dann in Bildform: 2.Karte Spieler1 Shell und 1KArte Spieler 2 Shell
und Spieler 2 hat dann: 2Karte Spieler2 Shell und 2 Karte Spieler1 Shell.
Flop, turn und River passen dann aber wieder... und ich checks nicht. warum sind da werte vertauscht... ich brüte seit Tagen drüber und komm nicht drauf.

Nach dem Showdown lösche ich auch brav alle Vectoren aber in der 2ten runde passen die ersten 8 Werte einfach nicht... der rest is wieder richtig....

ich weiß ohne code kann man es nicht gut verstehen aber ich frag mal so weil ich nicht wirklich weiß welchen code Teil ich posten soll. hat jemand ne Ahnung was da nicht passen kann?? wäre über ne Anregung sehr dankbar.

achja system is: ubuntu 9.04

lg Aly

2

15.06.2009, 20:07

Hallo AlymcGeel und Willkommen im Forum! :)

Glaube kaum, dass wir das ohne einen Fetzen Code geregelt kriegen.

Probier mal, ob du die relevanten Code-Abschnitte hier posten kannst.

Ansonsten, bei längerem Code z.B. hier reinkopieren.

PS:

Schönen Gruß von der da:


(Link)
fka tm

Faule Socke

Community-Fossil

Beiträge: 1 915

Wohnort: Schreibtischstuhl

  • Private Nachricht senden

3

15.06.2009, 22:13

Ist das n Insider Mikkie?^^

PS: Ich kenn noch einen aus Graz oder Umgebung, ist auch hier im Forum *zu dem Punkt rüberschiel*

Socke

4

15.06.2009, 22:20

Nur mal so als Tip: Der Threadtitel ist äußerst aussagelos, da weiß doch keiner, worum es eigentlich geht.

Und naja, dein Problem hört sich sehr nach einem Logikfehler an. Da kann man ohne Code unmöglich helfen. Vermutlich braucht man sogar eine ganze Menge Code, da du wahrscheinlich das Problem kaum genau eingrenzen kannst.
Aber vielleicht hilft dir der Debugger ja, oder wenn du einfach mal an ganz vielen Stellen die Werte mitlogst.
Lieber dumm fragen, als dumm bleiben!

5

15.06.2009, 22:24

Zitat von »"Faule Socke"«

Ist das n Insider Mikkie?^^


Nee, kein Insider.

Ich hatte so eine Assoziation... ;)

Aufklärung folgt bestimmt vom Threadersteller.
fka tm

6

15.06.2009, 22:55

ok. sry für den aussaglosen titel. ich habe halt viele h und cpp dateien und nicht eine wurst daher muss ich es mir erst zusammen suchen: aber ich probiers mal... für alle die sich denken, oh gott wie unsauber is denn dieser code... hab ja auch erst vor kurzem angefangen ...so hier:

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
void CPokerCard::create_deck()
{

    resetVector(); 
   // std::cout << "shuffle cards" << std::endl;

    player1_card1_siut = ((rand()%3+1));

    player1_card1_value = ((rand()%12+1));
    

    player1_card2_siut = ((rand()+1237)%3+1);

    player1_card2_value = (((rand()+7123)%12+1));
    if (player1_card2_value == player1_card1_value &&
        player1_card2_siut == player1_card1_siut) player1_card2_value++;
  

    player2_card1_siut = ((rand()+456)%3+1);

    player2_card1_value = (((rand()+456)%12+1));
    if (player2_card1_value == player1_card1_value &&
        player2_card1_siut == player1_card1_siut) player2_card1_value++; 
    if (player2_card1_value == player1_card2_value &&
        player2_card1_siut == player1_card2_siut) player2_card1_value++; 


    player2_card2_siut = ((rand()+456)%3+1);

    player2_card2_value = (((rand()+456)%12+1));
    if (player2_card2_value == player2_card1_value &&
        player2_card2_siut == player2_card1_siut) player2_card2_value++; 
    if (player2_card2_value == player1_card1_value &&
        player2_card2_siut == player1_card1_siut) player2_card2_value++; 
    if (player2_card2_value == player1_card2_value &&
        player2_card2_siut == player2_card2_siut) player2_card2_value++; 
//--------------------------------------------------

    flop1_siut = ((rand()%3+1));

    flop1_value = ((rand()%12+1));
    if (flop1_value == player1_card1_value &&
        flop1_siut == player1_card1_siut) flop1_value++; 
    if (flop1_value == player2_card1_value&&
        flop1_siut == player2_card1_siut) flop1_value++;
    if (flop1_value == player1_card2_value &&
        flop1_siut == player1_card2_siut) flop1_value++;
    if (flop1_value == player2_card2_value &&
        flop1_siut == player2_card2_siut) flop1_value++;

    flop2_siut = (((rand()+123)%3+1));

    flop2_value = (((rand()+123)%12+1));
    if (flop2_value == player1_card1_value &&
        flop2_siut == player1_card1_siut) flop2_value++; 
    if (flop2_value == player2_card1_value &&
        flop2_siut == player2_card1_siut) flop2_value++;
    if (flop2_value == player1_card2_value &&
        flop2_siut == player1_card2_siut) flop2_value++;
    if (flop2_value == player2_card2_value &&
        flop2_siut == player2_card2_siut) flop2_value++;
    if (flop2_value == flop1_value && flop2_siut == flop1_siut) flop2_value++;


    flop3_siut = (((rand()+456)%3+1));

    flop3_value = (((rand()+456)%12+1));   
    if (flop3_value == player1_card1_value &&
        flop3_siut == player1_card1_siut) flop3_value++; 
    if (flop3_value == player2_card1_value &&
        flop3_siut == player2_card1_siut) flop3_value++;
    if (flop3_value == player1_card2_value &&
        flop3_siut == player1_card2_siut) flop3_value++;
    if (flop3_value == player2_card2_value &&
        flop3_siut == player2_card2_siut) flop3_value++;
    if (flop3_value == flop2_value && flop3_siut == flop2_siut) flop3_value++;
    if (flop3_value == flop1_value && flop3_siut == flop1_siut) flop3_value++;
//--------------------------------------------------


    turn_value = ((rand()%12+1));

    turn_siut = ((rand()%3+1));
    if (turn_value == player1_card1_value &&
        turn_siut == player1_card1_siut) turn_value++; 
    if (turn_value == player2_card1_value &&
        turn_siut == player2_card1_siut) turn_value++;
    if (turn_value == player1_card2_value &&
        turn_siut == player1_card2_siut) turn_value++;
    if (turn_value == player2_card2_value &&
        turn_siut == player2_card2_siut) turn_value++;
    if (turn_value == flop2_value && turn_siut == flop2_siut) turn_value++;
    if (turn_value == flop1_value && turn_siut == flop1_siut) turn_value++;
    if (turn_value == flop3_value && turn_siut == flop3_siut) turn_value++;
//-----------------------------------------------

    river_value = ((rand()%12+1));

    river_siut = ((rand()%3+1));
    if (river_value == player1_card1_value &&
        river_siut == player1_card1_siut) river_value++; 
    if (river_value == player2_card1_value &&
        river_siut == player2_card1_siut) river_value++;
    if (river_value == player1_card2_value &&
        river_siut == player1_card2_siut) river_value++;
    if (river_value == player2_card2_value &&
        river_siut == player2_card2_siut) river_value++;
    if (river_value == flop2_value && river_siut == flop2_siut) river_value++;
    if (river_value == flop1_value && river_siut == flop1_siut) river_value++;
    if (river_value == flop3_value && river_siut == flop3_siut) river_value++;
    if (river_value == turn_value && river_siut == turn_siut) river_value++;
//------------------------------------------------

   
    getcards.push_back(player1_card1_siut);
    getcards.push_back(player1_card1_value);
    getcards.push_back(player1_card2_siut);
    getcards.push_back(player1_card2_value);
    getcards.push_back(player2_card1_siut);
    getcards.push_back(player2_card1_value);
    getcards.push_back(player2_card2_siut);
    getcards.push_back(player2_card2_value);
 
    getcards.push_back(flop1_siut);
    getcards.push_back(flop1_value);
    getcards.push_back(flop2_siut);
    getcards.push_back(flop2_value);
    getcards.push_back(flop3_siut);
    getcards.push_back(flop3_value);

    getcards.push_back(turn_siut);
    getcards.push_back(turn_value);
    getcards.push_back(river_siut);
    getcards.push_back(river_value);
 
    player1_card1 = siutes.at(player1_card1_siut) + " " +
                    values.at(player1_card1_value);
    
    player1_card2 = siutes.at(player1_card2_siut) + " " + 
                    values.at(player1_card2_value);
    
    player2_card1 = siutes.at(player2_card1_siut) + " " +
                    values.at(player2_card1_value);
    player2_card2 = siutes.at(player2_card2_siut) + " " +
                    values.at(player2_card2_value);

    flop1 = siutes.at(flop1_siut) + " " + values.at(flop1_value);
    flop2 = siutes.at(flop2_siut) + " " + values.at(flop2_value);
    flop3 = siutes.at(flop3_siut) + " " + values.at(flop3_value);
 
    turn = siutes.at(turn_siut) + " " + values.at(turn_value);
    river = siutes.at(river_siut) + " " + values.at(river_value);
      
}


und hier die svg sache:

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
void CSvgDoc::Update(int money1, int money2, int pot, int round_count)
{
  if (cards != pkrcrd_.getCardVec())
   {
     cards = pkrcrd_.getCardVec();
    // std::cout << "V E C T O R  E R R O R !!!!!!" << std::endl;

   }
  remove("anthem.svg");

  std::vector<std::string> siuts;
  std::vector<std::string> values;
  siuts.push_back("Data/siut_karo.gif");

  siuts.push_back("Data/siut_pik.gif");

  siuts.push_back("Data/siut_herz.gif");

  siuts.push_back("Data/siut_kreuz.gif");

    //Herz---------------------


  values.push_back("Data/value_2.gif");

  values.push_back("Data/value_3.gif");

  values.push_back("Data/value_4.gif");

  values.push_back("Data/value_5.gif");

  values.push_back("Data/value_6.gif");

  values.push_back("Data/value_7.gif");

  values.push_back("Data/value_8.gif");

  values.push_back("Data/value_9.gif");

  values.push_back("Data/value_10.gif");

  values.push_back("Data/value_bube.gif");

  values.push_back("Data/value_dame.gif");

  values.push_back("Data/value_koenig.gif");

  values.push_back("Data/value_ass.gif");
 


  output_file.open("anthem.svg",std::ios::out);
  output_file << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";

  output_file << "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" ";

  output_file << "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">";



  output_file << "<svg xmlns=\"http://www.w3.org/2000/svg\" ";

  output_file << "xmlns:xlink=\"http://www.w3.org/1999/xlink\" ";

  output_file << "xmlns:ev=\"http://www.w3.org/2001/xml-events\" ";

  output_file << "version=\"1.1\" baseProfile=\"full\">";



  output_file << std::endl;

  //welcome message

  output_file << "<text style=\"fill:black;\" x=\"150\" y=\"25\" font-size=\"20\">";
  output_file << "Welcome to Anthem Poker Linux Edition! ALPHA Release</text>" << std::endl;
  output_file << "<line x1=\"10\" y1=\"40\" x2=\"800\" y2=\"40\" stroke=\"black\"";
  output_file << " stroke-width=\"4\" />" << std::endl;

  //player 1 section

  output_file << "<text style=\"fill:black;\" x=\"100\" y=\"60\" font-size=\"15\">";
  output_file << "Spieler 1 Karten</text>" << std::endl;
 
  output_file << "<line x1=\"400\" y1=\"60\" x2=\"400\" y2=\"260\""; 
  output_file << " stroke=\"black\" stroke-width=\"2\" />" << std::endl;

  //player 2 section

  output_file << "<text style=\"fill:black;\" x=\"550\" y=\"60\" font-size=\"15\">";
  output_file << "Spieler 2 Karten</text>" << std::endl;
  
  output_file << "<line x1=\"10\" y1=\"285\" x2=\"800\" y2=\"285\""; 
  output_file << " stroke=\"black\" stroke-width=\"2\" />" << std::endl;

  
  output_file << "<text style=\"fill:black;\" x=\"335\" y=\"300\" font-size=\"15\">";
  output_file << "Am Tisch liegen</text>" << std::endl;
 
  output_file << "<line x1=\"10\" y1=\"525\" x2=\"800\" y2=\"525\""; 
  output_file << " stroke=\"black\" stroke-width=\"2\" />" << std::endl;

  //statistics

  output_file << "<text style=\"fill:black;\" x=\"20\" y=\"540\" font-size=\"15\">";
  output_file << "Spieler1 hat: " << money1 << " </text>" << std::endl;
  output_file << "<text style=\"fill:black;\" x=\"270\" y=\"540\" font-size=\"15\">";
  output_file << "Spieler2 hat: " << money2 << "  </text>" << std::endl;
  output_file << "<text style=\"fill:black;\" x=\"570\" y=\"540\" font-size=\"15\">";
  output_file << "Im Pot sind: " << pot << "  </text>" << std::endl;
  output_file << "<line x1=\"10\" y1=\"550\" x2=\"800\" y2=\"550\""; 
  output_file << " stroke=\"black\" stroke-width=\"4\" />" << std::endl;

  //Border Lines

  output_file << "<line x1=\"10\" y1=\"40\" x2=\"10\" y2=\"550\""; 
  output_file << " stroke=\"black\" stroke-width=\"4\" />" << std::endl;
  output_file << "<line x1=\"800\" y1=\"40\" x2=\"800\" y2=\"550\""; 
  output_file << " stroke=\"black\" stroke-width=\"4\" />" << std::endl;


  //starting putting cards into image

  //cards player 1

  output_file << "<image x=\"15\" y=\"132\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
             siuts[cards.at(0)] <<"\" />" << std::endl;
  
  output_file << "<image x=\"15\" y=\"82\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
             values[cards.at(1)] <<"\" />" << std::endl;
  output_file << "<image x=\"175\" y=\"132\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
             siuts[cards.at(2)] <<"\" />" << std::endl;
  output_file << "<image x=\"175\" y=\"82\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
             values[cards.at(3)] <<"\" />" << std::endl;
  //player 2 cards

  output_file << "<image x=\"470\" y=\"132\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
             siuts[cards.at(4)] <<"\" />" << std::endl;
  output_file << "<image x=\"470\" y=\"82\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
             values[cards.at(5)] <<"\" />" << std::endl;
  output_file << "<image x=\"630\" y=\"132\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
             siuts[cards.at(6)] <<"\" />" << std::endl;
  output_file << "<image x=\"630\" y=\"82\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
             values[cards.at(7)] <<"\" />" << std::endl;
  //verdeckte flop cards

  if (round_count == 0)
   {
    output_file << "<image x=\"15\" y=\"324\" width=\"126px\" height=\"199px\" xlink:href=\"" <<
                     "Data/card_back.gif\" />" << std::endl;
    output_file << "<image x=\"175\" y=\"324\" width=\"126px\" height=\"199px\" xlink:href=\"" <<
                     "Data/card_back.gif\" />" << std::endl;
    output_file << "<image x=\"335\" y=\"324\" width=\"126px\" height=\"199px\" xlink:href=\"" <<
                     "Data/card_back.gif\" />" << std::endl;
   }
  //table cards comming here...

  if (round_count == 1 || round_count == 2 || round_count == 3)
   {
    output_file << "<image x=\"15\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
               siuts[cards.at(8)] <<"\" />" << std::endl;
    output_file << "<image x=\"15\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
               values[cards.at(9)] <<"\" />" << std::endl;
    output_file << "<image x=\"175\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
               siuts[cards.at(10)] <<"\" />" << std::endl;
    output_file << "<image x=\"175\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
               values[cards.at(11)] <<"\" />" << std::endl;
    output_file << "<image x=\"335\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
               siuts[cards.at(12)] <<"\" />" << std::endl;
    output_file << "<image x=\"335\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
               values[cards.at(13)] <<"\" />" << std::endl;
   }
 //verdeckte turn and river cards

  if( round_count != 2 || round_count != 3)
    {
      output_file << "<image x=\"490\" y=\"324\" width=\"126px\" height=\"199px\" xlink:href=\"" <<
                   "Data/card_back.gif\" />" << std::endl;
      output_file << "<image x=\"650\" y=\"324\" width=\"126px\" height=\"199px\" xlink:href=\"" <<
                   "Data/card_back.gif\" />" << std::endl;
    }
  //turn and river...

  if (round_count == 2 || round_count == 3)
    {
     if (round_count == 2)
       {
         output_file << "<image x=\"490\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
                        siuts[cards.at(14)] <<"\" />" << std::endl;
         output_file << "<image x=\"490\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
                        values[cards.at(15)] <<"\" />" << std::endl;
       }
     if (round_count == 3 )
      {
        output_file << "<image x=\"490\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
                       siuts[cards.at(14)] <<"\" />" << std::endl;
        output_file << "<image x=\"490\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
                        values[cards.at(15)] <<"\" />" << std::endl;
        output_file << "<image x=\"650\" y=\"374\" width=\"129px\" height=\"149px\" xlink:href=\"" << 
                       siuts[cards.at(16)] <<"\" />" << std::endl;
        output_file << "<image x=\"650\" y=\"324\" width=\"129px\" height=\"52px\" xlink:href=\"" << 
                       values[cards.at(17)] <<"\" />" << std::endl;
      }
    }
  // end of card image building...

 
  output_file << "</svg>";
 // std::cout << "file build..." << std::endl;

  output_file.close();


und im gamhandler(der regelt die logik und so) werden einfach die beiden vectoren beim showdown gelöscht.


C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
case SHOWDOWN:

               {
                roundShowdown();

                std::cout << "\n\n mische und gebe ...\n";
                std::cout << "--------------------------------------------\n\n";
                m_round_counter = PREFLOP;
                pkrcrd_.resetVector();
                pkrcrd_.create_deck();
                players_[0]->setActive();
                break;




und das auf dem bild is Allymcbeal und da mein Name ähnlich is wird er wohl das bild gepostet haben... mein name ist so gewählt weil mein nachname mit G anfangt und irgendwann kam ich auf: AlymcGeel.

danke im voraus für alle die es sich antun das alles zu lesen... lg

7

16.06.2009, 18:18

Zitat von »"AlymcGeel"«

und das auf dem bild is Allymcbeal und da mein Name ähnlich is wird er wohl das bild gepostet haben...

Calista Flockhart, Schauspielerin und Frau von Harrison "Indiana Jones" Ford. ;)

Zu deinem Code?
Wirklich särr schlecht zu lesen (drum habe ich ihn auch nur überflogen).
Auffällig sind die vielen "if" ohne "else if"...
Da hilft wohl nur debuggen.
fka tm

8

16.06.2009, 20:00

mh ja wird wohl am debugger hängen bleiben. die ifs sind nur übergangslösung. ich überprüf da einfach jede karte mit jeder anderen um keine gleichen zu haben weil mir nix gscheites eingefallen is hab ichs mal so gelassen...

ich muss gestehen ich habe noch nie einen debugger verwendet? gibts da einen guten für linux? ich habe gehört da gibts was commandozeilenartiges aber ne gui wäre doch ganz nett...

und ja ich habe halt nur ihren Namen in der Serie hergenommen weil er meinem so ähnlich is, aber dass si mit Harrison "Han Solo" Ford (gg) zammen is wusste ich nicht.

lg Alexander

9

19.06.2009, 09:41

so ich wollte nur mal bescheid geben, dass ich soeben auf das problem drauf gekommen bin. der Fehler war einfach ganz wo anders als dort wo ich es vermutet hatte. er war nicht in der graphik ausgabe sonder die funktion, die in der shell die Karten der Spieler ausgibt war falsch.

Sie wird 4 mal aufgerufen und entsheided per switch/case welche karte grade dran is... und dieser zähler der die karten mitzählt wurde nicht auf 0 gesetzt nach den runden somit waren die ausgaben der spielerkarten willkürlich.

aber danke trotzdem an alle, die sich dem problem angenommen haben...

lg Aly

Nox

Supermoderator

Beiträge: 5 272

Beruf: Student

  • Private Nachricht senden

10

19.06.2009, 12:10

Erfreulich dass du den Fehler fandest. Wielange programmierst du eigentlich schon? Weil die vielen Wiederholungen im Quellcode sind doch ein deutliches Zeichen dafür, dass man da sicher noch einiges aufbaumäßig optimieren kann. Aber das weißt du ja sicher schon, wie man da dran gehen kann.
PRO Lernkurs "Wie benutze ich eine Doku richtig"!
CONTRA lasst mal die anderen machen!
networklibbenc - Netzwerklibs im Vergleich | syncsys - Netzwerk lib (MMO-ready) | Schleichfahrt Remake | Firegalaxy | Sammelsurium rund um FPGA&Co.

Werbeanzeige