aboutsummaryrefslogtreecommitdiff
path: root/games/CaribbeanStud/files/patch-Deck.cpp
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-09-28 11:49:27 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-09-28 11:49:27 +0000
commitbaf470f2da3ae5b63170169ad8efbd61b6fc65f2 (patch)
treed2103145302b029921e547af83e0e9bc9df696d1 /games/CaribbeanStud/files/patch-Deck.cpp
parent44c28c4e1c9b05f57c9368f86a8e749847c8f64b (diff)
downloadports-baf470f2da3ae5b63170169ad8efbd61b6fc65f2.tar.gz
ports-baf470f2da3ae5b63170169ad8efbd61b6fc65f2.zip
Notes
Diffstat (limited to 'games/CaribbeanStud/files/patch-Deck.cpp')
-rw-r--r--games/CaribbeanStud/files/patch-Deck.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/games/CaribbeanStud/files/patch-Deck.cpp b/games/CaribbeanStud/files/patch-Deck.cpp
new file mode 100644
index 000000000000..21a640edf064
--- /dev/null
+++ b/games/CaribbeanStud/files/patch-Deck.cpp
@@ -0,0 +1,38 @@
+--- Deck.cpp.orig Tue Aug 19 12:02:29 2003
++++ Deck.cpp Tue Aug 19 12:05:01 2003
+@@ -38,7 +38,8 @@
+ _globalCards[j] = Card(j);
+ _globalInit = 1;
+ }
+- for(int i =0 ; i < _numOfCards; i++)
++ int i;
++ for(i =0 ; i < _numOfCards; i++)
+ _cards[i] = & _globalCards[i];
+ for(i=_numOfCards; i < 54; i++)
+ _cards[i] = (Card *) 0;
+@@ -55,7 +56,7 @@
+ {
+ for (int i = 0; i < _numOfCards/2; i++)
+ to[i*2] = from[_numOfCards/2+i];
+- for ( i = 0; i < _numOfCards/2; i++)
++ for (int i = 0; i < _numOfCards/2; i++)
+ to[i*2+1] = from[i];
+ Card **tmp = from;
+ from = to;
+@@ -82,13 +83,13 @@
+
+ for(int i=_numOfCards-cut; i< _numOfCards; i++)
+ tmp[i] = _cards[i];
+- for( i = _numOfCards-1; i >= cut; i--)
++ for(int i = _numOfCards-1; i >= cut; i--)
+ _cards[i] = _cards[i-cut];
+- for( i = 0; i < cut; i++)
++ for(int i = 0; i < cut; i++)
+ _cards[ i ] = tmp[i + _numOfCards-cut];
+ #ifdef DEBUG
+ cout << "Cutting at " << _numOfCards-cut <<endl;
+- for ( i = 0; i < _numOfCards; i++ ){
++ for (int i = 0; i < _numOfCards; i++ ){
+ if( i%10 == 0 ) cout << endl;
+ cout << _cards[i]->Suit() << (int)_cards[i]->Rank() << " ";
+ }