private int CreateTable(RemoteTcpServer serverEntity)
        {
            var cmd = new CreateTableCommand()
            {
                Params = new TableParams()
                {
                    //Blind = BlindTypeEnum.Blinds,
                    Options = new GameTypeOptionsStandard(),
                    //GameSize = 10,
                    //Limit = LimitTypeEnum.NoLimit,
                    Lobby = new LobbyOptionsQuickMode()
                    {
                        //StartingAmount = 1500
                    },
                    MaxPlayers        = 10,
                    MinPlayersToStart = 2,
                    TableName         = "Table One",
                    Variant           = GameSubTypeEnum.Standard,
                    WaitingTimes      = new ConfigurableWaitingTimes()
                    {
                        //AfterBoardDealed = 0,
                        AfterPlayerAction = 0,
                        //AfterPotWon = 0
                    }
                }
            };

            serverEntity.Send(cmd);
            var response = serverEntity.WaitForNextCommand <CreateTableResponse>();

            Assert.AreNotEqual(response.IdTable, -1);
            return(response.IdTable);
        }
        private void PlayMoney(RemoteTcpServer serverEntity, int tableId, int money)
        {
            var cmd = new PlayerPlayMoneyCommand()
            {
                TableId      = tableId,
                AmountPlayed = money
            };

            serverEntity.Send(cmd);
        }
        private void JoinUnjoinableTable(RemoteTcpServer serverEntity, int table)
        {
            var cmd = new JoinTableCommand()
            {
                TableId = table
            };

            serverEntity.Send(cmd);
            var response = serverEntity.WaitForNextCommand <JoinTableResponse>();

            Assert.IsFalse(response.Success);
        }
        private void IdentifyAs(RemoteTcpServer serverEntity, string name)
        {
            var cmd = new IdentifyCommand()
            {
                Name = name
            };

            serverEntity.Send(cmd);
            var response = serverEntity.WaitForNextCommand <IdentifyResponse>();

            Assert.IsTrue(response.Success);
            serverEntity.Name = name;
        }
        private int SitInSeat(RemoteTcpServer serverEntity, int tableId, int noSeat)
        {
            var cmd = new PlayerSitInCommand()
            {
                TableId     = tableId,
                MoneyAmount = 1500,
                NoSeat      = noSeat
            };

            serverEntity.Send(cmd);
            var response = serverEntity.WaitForNextCommand <PlayerSitInResponse>();

            Assert.AreEqual(noSeat, response.NoSeat);
            return(noSeat);
        }