Console client: Print a message if the action was rejected by the server.
This commit is contained in:
@@ -85,6 +85,11 @@ namespace pokerth_console
|
|||||||
Console.WriteLine("{0} {1}.", name, Log.ActionToString(action, curBet));
|
Console.WriteLine("{0} {1}.", name, Log.ActionToString(action, curBet));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ActionRejected()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Your action was rejected by the server.");
|
||||||
|
}
|
||||||
|
|
||||||
public void ShowFlopCards(int[] cards)
|
public void ShowFlopCards(int[] cards)
|
||||||
{
|
{
|
||||||
Console.WriteLine("\n--- Flop --- [{0}, {1}, {2}]",
|
Console.WriteLine("\n--- Flop --- [{0}, {1}, {2}]",
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ namespace pokerth_lib
|
|||||||
void MyTurn(Hand.State state, uint highestSet, uint minimumRaise, uint money);
|
void MyTurn(Hand.State state, uint highestSet, uint minimumRaise, uint money);
|
||||||
void PlayersTurn(Hand.State state, string player);
|
void PlayersTurn(Hand.State state, string player);
|
||||||
void ActionDone(string name, Hand.Action action, uint curBet);
|
void ActionDone(string name, Hand.Action action, uint curBet);
|
||||||
|
void ActionRejected();
|
||||||
void ShowFlopCards(int[] cards);
|
void ShowFlopCards(int[] cards);
|
||||||
void ShowTurnCards(int[] cards);
|
void ShowTurnCards(int[] cards);
|
||||||
void ShowRiverCards(int[] cards);
|
void ShowRiverCards(int[] cards);
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ namespace pokerth_lib
|
|||||||
{
|
{
|
||||||
// Connect to the server.
|
// Connect to the server.
|
||||||
// Try IPv6 first.
|
// Try IPv6 first.
|
||||||
/*IPAddress[] addresses = new IPAddress[2];
|
IPAddress[] addresses = new IPAddress[2];
|
||||||
addresses[0] = IPAddress.Parse(m_settings.ServerSettings.IPv6Address);
|
addresses[0] = IPAddress.Parse(m_settings.ServerSettings.IPv6Address);
|
||||||
addresses[1] = IPAddress.Parse(m_settings.ServerSettings.IPv4Address);
|
addresses[1] = IPAddress.Parse(m_settings.ServerSettings.IPv4Address);
|
||||||
m_tcpClient.Connect(addresses, m_settings.ServerSettings.Port);*/
|
m_tcpClient.Connect(addresses, m_settings.ServerSettings.Port);
|
||||||
m_tcpClient.Connect("localhost", 7234);
|
//m_tcpClient.Connect("localhost", 7234);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
|
|||||||
@@ -202,6 +202,9 @@ namespace pokerth_lib
|
|||||||
case NetTypePlayersActionDone :
|
case NetTypePlayersActionDone :
|
||||||
tmpPacket = new NetPacketPlayersActionDone(size, reader);
|
tmpPacket = new NetPacketPlayersActionDone(size, reader);
|
||||||
break;
|
break;
|
||||||
|
case NetTypePlayersActionRejected :
|
||||||
|
tmpPacket = new NetPacketPlayersActionRejected(size, reader);
|
||||||
|
break;
|
||||||
case NetTypeDealFlopCards :
|
case NetTypeDealFlopCards :
|
||||||
tmpPacket = new NetPacketDealFlopCards(size, reader);
|
tmpPacket = new NetPacketDealFlopCards(size, reader);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ namespace pokerth_lib
|
|||||||
|
|
||||||
public void VisitPlayersActionRejected(NetPacket p)
|
public void VisitPlayersActionRejected(NetPacket p)
|
||||||
{
|
{
|
||||||
// TODO
|
m_callback.ActionRejected();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VisitDealFlopCards(NetPacket p)
|
public void VisitDealFlopCards(NetPacket p)
|
||||||
|
|||||||
Reference in New Issue
Block a user