summaryrefslogtreecommitdiffstats
path: root/opponent.cpp
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2011-01-30 04:19:51 -0600
committerKamil Kaminski <kamilkss@gmail.com>2011-01-30 04:19:51 -0600
commit223dd4cdb6b44bd8102cde2210cf2e39af8ac87e (patch)
treedba9c3d2415748c7a9add4058692e559193aa564 /opponent.cpp
parent3ee143e7b0e81b1728fb808da0f42b60b043b063 (diff)
downloadpoker-223dd4cdb6b44bd8102cde2210cf2e39af8ac87e.tar.gz
poker-223dd4cdb6b44bd8102cde2210cf2e39af8ac87e.tar.bz2
poker-223dd4cdb6b44bd8102cde2210cf2e39af8ac87e.zip
implement evaluation and showing of hands
Diffstat (limited to 'opponent.cpp')
-rw-r--r--opponent.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/opponent.cpp b/opponent.cpp
index 022e26c..63dc73a 100644
--- a/opponent.cpp
+++ b/opponent.cpp
@@ -6,9 +6,11 @@
#include "opponent.h"
-Opponent::Opponent(void) : whatHand(9)
+Opponent::Opponent(void)
{
-
+ whatHand[0] = 9;
+ whatHand[1] = 9;
+ whatHand[2] = 9;
}
void Opponent::dealOpponentCards(void)
@@ -53,3 +55,13 @@ Card **Opponent::getOpponentsCards(int whichOpponent)
return opponentCards[whichOpponent-1];
}
+void Opponent::setOpponentHand(int hand, int whichOpponent)
+{
+ whatHand[whichOpponent-1] = hand;
+}
+
+int Opponent::getOpponentHand(int whichOpponent)
+{
+ return whatHand[whichOpponent-1];
+}
+