diff --git a/console/src/ConsoleCallback.cs b/console/src/ConsoleCallback.cs
index c7eb5283..8c65caf8 100644
--- a/console/src/ConsoleCallback.cs
+++ b/console/src/ConsoleCallback.cs
@@ -45,7 +45,7 @@ namespace pokerth_console
outPlayers += ", ";
outPlayers += s;
}
- Console.WriteLine("Game was started. Players: {0}", outPlayers);
+ Console.WriteLine("Game was started. Players: {0}.", outPlayers);
}
public void HandStarted(pokerth_lib.Hand h)
@@ -71,12 +71,32 @@ namespace pokerth_console
public void ActionDone(string name, Hand.Action action, uint totalBet, uint money, uint highestSet, uint minimumRaise)
{
- Console.WriteLine("{0} acts: {1}. Total bet: {2}. Money left: {3}",
+ Console.WriteLine("{0} acts: {1}. Total bet: {2}. Money left: {3}.",
name, Log.ActionToString(action), totalBet, money);
- Console.WriteLine("Highest set: {0}. Minimum raise: {1}",
+ Console.WriteLine("Highest set: {0}. Minimum raise: {1}.",
highestSet, minimumRaise);
}
+ public void ShowFlopCards(int firstFlopCard, int secondFlopCard, int thirdFlopCard)
+ {
+ Console.WriteLine("Flop cards: {0} {1} {2}.",
+ Log.CardToString(firstFlopCard),
+ Log.CardToString(secondFlopCard),
+ Log.CardToString(thirdFlopCard));
+ }
+
+ public void ShowTurnCard(int turnCard)
+ {
+ Console.WriteLine("Turn card: {0}.",
+ Log.CardToString(turnCard));
+ }
+
+ public void ShowRiverCard(int riverCard)
+ {
+ Console.WriteLine("River card: {0}.",
+ Log.CardToString(riverCard));
+ }
+
public void Error(string message)
{
Console.WriteLine("Error: " + message);
diff --git a/console/src/lib/ICallback.cs b/console/src/lib/ICallback.cs
index 233eb985..3a0e59dd 100644
--- a/console/src/lib/ICallback.cs
+++ b/console/src/lib/ICallback.cs
@@ -1,4 +1,23 @@
-using System;
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
using System.Collections.Generic;
using System.Text;
@@ -13,6 +32,9 @@ namespace pokerth_lib
void MyTurn(Hand.State state);
void PlayersTurn(Hand.State state, string player);
void ActionDone(string name, Hand.Action action, uint totalBet, uint money, uint highestSet, uint minimumRaise);
+ void ShowFlopCards(int firstFlopCard, int secondFlopCard, int thirdFlopCard);
+ void ShowTurnCard(int turnCard);
+ void ShowRiverCard(int riverCard);
void Error(string message);
}
}
diff --git a/console/src/lib/Log.cs b/console/src/lib/Log.cs
index c49a63d9..d7dbb38a 100644
--- a/console/src/lib/Log.cs
+++ b/console/src/lib/Log.cs
@@ -1,4 +1,23 @@
-using System;
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
using System.Collections.Generic;
using System.Text;
diff --git a/console/src/lib/Player.cs b/console/src/lib/Player.cs
index 83a6f9bd..c052c9ea 100644
--- a/console/src/lib/Player.cs
+++ b/console/src/lib/Player.cs
@@ -1,4 +1,23 @@
-using System;
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
using System.Collections.Generic;
using System.Text;
diff --git a/console/src/lib/net/INetPacketVisitor.cs b/console/src/lib/net/INetPacketVisitor.cs
index 0d25af1f..ad4c5ad7 100644
--- a/console/src/lib/net/INetPacketVisitor.cs
+++ b/console/src/lib/net/INetPacketVisitor.cs
@@ -42,5 +42,8 @@ namespace pokerth_lib
void VisitPlayersAction(NetPacket p);
void VisitPlayersActionDone(NetPacket p);
void VisitPlayersActionRejected(NetPacket p);
+ void VisitDealFlopCards(NetPacket p);
+ void VisitDealTurnCard(NetPacket p);
+ void VisitDealRiverCard(NetPacket p);
}
}
diff --git a/console/src/lib/net/NetPacket.cs b/console/src/lib/net/NetPacket.cs
index ee166355..0a5fd580 100644
--- a/console/src/lib/net/NetPacket.cs
+++ b/console/src/lib/net/NetPacket.cs
@@ -131,6 +131,11 @@ namespace pokerth_lib
HighestSet,
MinimumRaise,
ActionRejectReason,
+ FlopFirstCard,
+ FlopSecondCard,
+ FlopThirdCard,
+ TurnCard,
+ RiverCard,
}
public enum ListPropType
@@ -175,6 +180,15 @@ namespace pokerth_lib
case NetTypePlayersActionDone :
tmpPacket = new NetPacketPlayersActionDone(size, reader);
break;
+ case NetTypeDealFlopCards :
+ tmpPacket = new NetPacketDealFlopCards(size, reader);
+ break;
+ case NetTypeDealTurnCard :
+ tmpPacket = new NetPacketDealTurnCard(size, reader);
+ break;
+ case NetTypeDealRiverCard :
+ tmpPacket = new NetPacketDealRiverCard(size, reader);
+ break;
default:
break;
}
diff --git a/console/src/lib/net/NetPacketCreateGame.cs b/console/src/lib/net/NetPacketCreateGame.cs
new file mode 100644
index 00000000..985e1611
--- /dev/null
+++ b/console/src/lib/net/NetPacketCreateGame.cs
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.IO;
+
+
+namespace pokerth_lib.src
+{
+ class NetPacketCreateGame : NetPacket
+ {
+ public NetPacketCreateGame()
+ : base(NetPacket.NetTypeCreateGame)
+ {
+ }
+
+ public override void Accept(INetPacketVisitor visitor)
+ {
+ visitor.VisitCreateGame(this);
+ }
+
+ public override byte[] ToByteArray()
+ {
+ MemoryStream memStream = new MemoryStream();
+ BinaryWriter w = new BinaryWriter(memStream);
+
+ string gamePassword = Properties[PropType.GamePassword];
+ byte[] tmpPassword = Encoding.UTF8.GetBytes(gamePassword);
+ int passwordWithPadding = AddPadding(tmpPassword.Length);
+ string gameName = Properties[PropType.GameName];
+ byte[] tmpName = Encoding.UTF8.GetBytes(gameName);
+ int nameWithPadding = AddPadding(tmpName.Length);
+ int numBlindSlots = ListProperties[ListPropType.ManualBlindSlots].Count;
+ int size = 8 + 28 + numBlindSlots * 4 + passwordWithPadding + nameWithPadding;
+
+ w.Write(IPAddress.HostToNetworkOrder((short)Type));
+ w.Write(IPAddress.HostToNetworkOrder((short)size));
+ w.Write(IPAddress.HostToNetworkOrder((short)gamePassword.Length));
+ w.Write(IPAddress.HostToNetworkOrder((short)gameName.Length));
+
+ WriteGameInfoBlock(w);
+
+ return memStream.ToArray();
+ }
+ }
+}
diff --git a/console/src/lib/net/NetPacketDealFlopCards.cs b/console/src/lib/net/NetPacketDealFlopCards.cs
new file mode 100644
index 00000000..35d53a4f
--- /dev/null
+++ b/console/src/lib/net/NetPacketDealFlopCards.cs
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.IO;
+
+
+namespace pokerth_lib
+{
+ class NetPacketDealFlopCards : NetPacket
+ {
+ public NetPacketDealFlopCards()
+ : base(NetPacket.NetTypeDealFlopCards)
+ {
+ }
+
+ public NetPacketDealFlopCards(int size, BinaryReader r)
+ : base(NetPacket.NetTypeDealFlopCards)
+ {
+ if (size != 12)
+ throw new NetPacketException("NetPacketDealFlopCards invalid size.");
+ Properties.Add(PropType.FlopFirstCard,
+ Convert.ToString(IPAddress.NetworkToHostOrder((short)r.ReadUInt16())));
+ Properties.Add(PropType.FlopSecondCard,
+ Convert.ToString(IPAddress.NetworkToHostOrder((short)r.ReadUInt16())));
+ Properties.Add(PropType.FlopThirdCard,
+ Convert.ToString(IPAddress.NetworkToHostOrder((short)r.ReadUInt16())));
+ }
+
+ public override void Accept(INetPacketVisitor visitor)
+ {
+ visitor.VisitDealFlopCards(this);
+ }
+
+ public override byte[] ToByteArray()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/console/src/lib/net/NetPacketDealRiverCard.cs b/console/src/lib/net/NetPacketDealRiverCard.cs
new file mode 100644
index 00000000..7924e44f
--- /dev/null
+++ b/console/src/lib/net/NetPacketDealRiverCard.cs
@@ -0,0 +1,56 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.IO;
+
+
+namespace pokerth_lib
+{
+ class NetPacketDealRiverCard : NetPacket
+ {
+ public NetPacketDealRiverCard()
+ : base(NetPacket.NetTypeDealRiverCard)
+ {
+ }
+
+ public NetPacketDealRiverCard(int size, BinaryReader r)
+ : base(NetPacket.NetTypeDealRiverCard)
+ {
+ if (size != 8)
+ throw new NetPacketException("NetPacketDealRiverCard invalid size.");
+ Properties.Add(PropType.RiverCard,
+ Convert.ToString(IPAddress.NetworkToHostOrder((short)r.ReadUInt16())));
+ }
+
+ public override void Accept(INetPacketVisitor visitor)
+ {
+ visitor.VisitDealRiverCard(this);
+ }
+
+ public override byte[] ToByteArray()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/console/src/lib/net/NetPacketDealTurnCard.cs b/console/src/lib/net/NetPacketDealTurnCard.cs
new file mode 100644
index 00000000..0d2256b3
--- /dev/null
+++ b/console/src/lib/net/NetPacketDealTurnCard.cs
@@ -0,0 +1,56 @@
+/***************************************************************************
+ * Copyright (C) 2008 by Lothar May *
+ * *
+ * This file is part of pokerth_console. *
+ * pokerth_console is free software: you can redistribute it and/or *
+ * modify it under the terms of the GNU Affero General Public License *
+ * as published by the Free Software Foundation, either version 3 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * pokerth_console is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the *
+ * GNU Affero General Public License along with pokerth_console. *
+ * If not, see . *
+ ***************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.IO;
+
+
+namespace pokerth_lib
+{
+ class NetPacketDealTurnCard : NetPacket
+ {
+ public NetPacketDealTurnCard()
+ : base(NetPacket.NetTypeDealTurnCard)
+ {
+ }
+
+ public NetPacketDealTurnCard(int size, BinaryReader r)
+ : base(NetPacket.NetTypeDealTurnCard)
+ {
+ if (size != 8)
+ throw new NetPacketException("NetPacketDealTurnCard invalid size.");
+ Properties.Add(PropType.TurnCard,
+ Convert.ToString(IPAddress.NetworkToHostOrder((short)r.ReadUInt16())));
+ }
+
+ public override void Accept(INetPacketVisitor visitor)
+ {
+ visitor.VisitDealTurnCard(this);
+ }
+
+ public override byte[] ToByteArray()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/console/src/lib/net/NetPacketGameListNew.cs b/console/src/lib/net/NetPacketGameListNew.cs
index 7ab620d4..01bf4174 100644
--- a/console/src/lib/net/NetPacketGameListNew.cs
+++ b/console/src/lib/net/NetPacketGameListNew.cs
@@ -24,36 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED GameInfoData
-{
- u_int16_t maxNumberOfPlayers;
- u_int16_t raiseIntervalMode;
- u_int16_t raiseSmallBlindInterval;
- u_int16_t raiseMode;
- u_int16_t endRaiseMode;
- u_int16_t numberOfManualBlinds;
- u_int16_t proposedGuiSpeed;
- u_int16_t playerActionTimeout;
- u_int32_t firstSmallBlind;
- u_int32_t endRaiseSmallBlindValue;
- u_int32_t startMoney;
-};
-*/
-
-/*
-struct GCC_PACKED NetPacketGameListNewData
-{
- NetPacketHeader head;
- u_int32_t gameId;
- u_int32_t adminPlayerId;
- u_int16_t gameMode;
- u_int16_t gameNameLength;
- u_int16_t curNumberOfPlayers;
- u_int16_t gameFlags;
- GameInfoData gameData;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketGameListUpdate.cs b/console/src/lib/net/NetPacketGameListUpdate.cs
index a087780c..b5ea0e7a 100644
--- a/console/src/lib/net/NetPacketGameListUpdate.cs
+++ b/console/src/lib/net/NetPacketGameListUpdate.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketGameListUpdateData
-{
- NetPacketHeader head;
- u_int32_t gameId;
- u_int16_t gameMode;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketGameStart.cs b/console/src/lib/net/NetPacketGameStart.cs
index be3c3736..c5ce014f 100644
--- a/console/src/lib/net/NetPacketGameStart.cs
+++ b/console/src/lib/net/NetPacketGameStart.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketGameStartData
-{
- NetPacketHeader head;
- u_int32_t startDealerPlayerId;
- u_int16_t numberOfPlayers;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketHandStart.cs b/console/src/lib/net/NetPacketHandStart.cs
index 8b354760..ba35ac80 100644
--- a/console/src/lib/net/NetPacketHandStart.cs
+++ b/console/src/lib/net/NetPacketHandStart.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketHandStartData
-{
- NetPacketHeader head;
- u_int16_t yourCard1;
- u_int16_t yourCard2;
- u_int32_t smallBlind;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketInit.cs b/console/src/lib/net/NetPacketInit.cs
index 00b4913d..376c0619 100644
--- a/console/src/lib/net/NetPacketInit.cs
+++ b/console/src/lib/net/NetPacketInit.cs
@@ -24,18 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketInitData
-{
- NetPacketHeader head;
- u_int16_t requestedVersionMajor;
- u_int16_t requestedVersionMinor;
- u_int16_t passwordLength;
- u_int16_t playerNameLength;
- u_int16_t privacyFlags;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketInitAck.cs b/console/src/lib/net/NetPacketInitAck.cs
index e8a704a9..0e39cb93 100644
--- a/console/src/lib/net/NetPacketInitAck.cs
+++ b/console/src/lib/net/NetPacketInitAck.cs
@@ -24,16 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketInitAckData
-{
- NetPacketHeader head;
- u_int16_t latestGameVersion;
- u_int16_t latestBetaRevision;
- u_int32_t sessionId;
- u_int32_t playerId;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketJoinGame.cs b/console/src/lib/net/NetPacketJoinGame.cs
index f8a1e5c7..4ebd39d2 100644
--- a/console/src/lib/net/NetPacketJoinGame.cs
+++ b/console/src/lib/net/NetPacketJoinGame.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketJoinGameData
-{
- NetPacketHeader head;
- u_int32_t gameId;
- u_int16_t passwordLength;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketJoinGameAck.cs b/console/src/lib/net/NetPacketJoinGameAck.cs
index 6d723d4c..bf66f0c8 100644
--- a/console/src/lib/net/NetPacketJoinGameAck.cs
+++ b/console/src/lib/net/NetPacketJoinGameAck.cs
@@ -24,16 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketJoinGameAckData
-{
- NetPacketHeader head;
- u_int32_t gameId;
- u_int16_t playerRights;
- u_int16_t reserved;
- GameInfoData gameData;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketPlayerInfo.cs b/console/src/lib/net/NetPacketPlayerInfo.cs
index 397cf0a3..f155e531 100644
--- a/console/src/lib/net/NetPacketPlayerInfo.cs
+++ b/console/src/lib/net/NetPacketPlayerInfo.cs
@@ -24,16 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketPlayerInfoData
-{
- NetPacketHeader head;
- u_int32_t playerId;
- u_int16_t playerFlags;
- u_int16_t playerNameLength;
- u_int32_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketPlayersAction.cs b/console/src/lib/net/NetPacketPlayersAction.cs
index 93a67bfa..c3fdbc38 100644
--- a/console/src/lib/net/NetPacketPlayersAction.cs
+++ b/console/src/lib/net/NetPacketPlayersAction.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketPlayersActionData
-{
- NetPacketHeader head;
- u_int16_t gameState;
- u_int16_t playerAction;
- u_int32_t playerBet;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketPlayersActionDone.cs b/console/src/lib/net/NetPacketPlayersActionDone.cs
index b1a20cc6..0296556c 100644
--- a/console/src/lib/net/NetPacketPlayersActionDone.cs
+++ b/console/src/lib/net/NetPacketPlayersActionDone.cs
@@ -24,19 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketPlayersActionDoneData
-{
- NetPacketHeader head;
- u_int32_t playerId;
- u_int16_t gameState;
- u_int16_t playerAction;
- u_int32_t totalPlayerBet;
- u_int32_t playerMoney;
- u_int32_t highestSet;
- u_int32_t minimumRaise;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketPlayersActionRejected.cs b/console/src/lib/net/NetPacketPlayersActionRejected.cs
index 22207374..c5b84c7c 100644
--- a/console/src/lib/net/NetPacketPlayersActionRejected.cs
+++ b/console/src/lib/net/NetPacketPlayersActionRejected.cs
@@ -24,17 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketPlayersActionRejectedData
-{
- NetPacketHeader head;
- u_int16_t gameState;
- u_int16_t playerAction;
- u_int32_t playerBet;
- u_int16_t rejectionReason;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketPlayersTurn.cs b/console/src/lib/net/NetPacketPlayersTurn.cs
index 7cd71f23..cae75cbc 100644
--- a/console/src/lib/net/NetPacketPlayersTurn.cs
+++ b/console/src/lib/net/NetPacketPlayersTurn.cs
@@ -24,15 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketPlayersTurnData
-{
- NetPacketHeader head;
- u_int32_t playerId;
- u_int16_t gameState;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketRetrievePlayerInfo.cs b/console/src/lib/net/NetPacketRetrievePlayerInfo.cs
index 1b9e4ea0..d434d32c 100644
--- a/console/src/lib/net/NetPacketRetrievePlayerInfo.cs
+++ b/console/src/lib/net/NetPacketRetrievePlayerInfo.cs
@@ -24,13 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketRetrievePlayerInfoData
-{
- NetPacketHeader head;
- u_int32_t playerId;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketStartEvent.cs b/console/src/lib/net/NetPacketStartEvent.cs
index e4b7ffed..d33a13d8 100644
--- a/console/src/lib/net/NetPacketStartEvent.cs
+++ b/console/src/lib/net/NetPacketStartEvent.cs
@@ -24,14 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketStartEventData
-{
- NetPacketHeader head;
- u_int16_t startFlags;
- u_int16_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetPacketStartEventAck.cs b/console/src/lib/net/NetPacketStartEventAck.cs
index e659ef5d..94b8fed1 100644
--- a/console/src/lib/net/NetPacketStartEventAck.cs
+++ b/console/src/lib/net/NetPacketStartEventAck.cs
@@ -24,13 +24,6 @@ using System.Net;
using System.Net.Sockets;
using System.IO;
-/*
-struct GCC_PACKED NetPacketStartEventAckData
-{
- NetPacketHeader head;
- u_int32_t reserved;
-};
-*/
namespace pokerth_lib
{
diff --git a/console/src/lib/net/NetParser.cs b/console/src/lib/net/NetParser.cs
index 3ed5a7c8..0f5cb1f0 100644
--- a/console/src/lib/net/NetParser.cs
+++ b/console/src/lib/net/NetParser.cs
@@ -202,6 +202,26 @@ namespace pokerth_lib
// TODO
}
+ public void VisitDealFlopCards(NetPacket p)
+ {
+ m_callback.ShowFlopCards(
+ Convert.ToInt32(p.Properties[NetPacket.PropType.FlopFirstCard]),
+ Convert.ToInt32(p.Properties[NetPacket.PropType.FlopSecondCard]),
+ Convert.ToInt32(p.Properties[NetPacket.PropType.FlopThirdCard]));
+ }
+
+ public void VisitDealTurnCard(NetPacket p)
+ {
+ m_callback.ShowTurnCard(
+ Convert.ToInt32(p.Properties[NetPacket.PropType.TurnCard]));
+ }
+
+ public void VisitDealRiverCard(NetPacket p)
+ {
+ m_callback.ShowRiverCard(
+ Convert.ToInt32(p.Properties[NetPacket.PropType.RiverCard]));
+ }
+
private PokerTHData m_data;
private SenderThread m_sender;
private ICallback m_callback;