protected virtual void PlayBidding() { if (Game.CurrentBidding.CurrentPlayer == Position) { var data = new BidActionRequestSerializer() { Height = (int)ContractHeight.NONE, Color = (int)ContractColor.NONE, X = false, XX = false }; Console.WriteLine(Username + "> Licytuje: pas"); PerformServerAction("bid", data.GetApiObject(), null, null); } }
protected virtual void PlayBidding() { if (Game.CurrentBidding.CurrentPlayer == Position) { var history = Game.CurrentBidding.ContractList; List <int> AI_history = new List <int>(); foreach (var bid in history) { int AI_bid = ((int)(bid.ContractColor) + 1) + (int)(bid.ContractHeight) * 10; AI_history.Add(AI_bid); } int newBid = AILogic.Bid(AI_history); int h; int c; if (newBid == 0) { h = -1; c = -1; } else { h = newBid / 10; c = newBid % 10 - 1; } var data = new BidActionRequestSerializer() { Height = h, Color = c, X = false, XX = false }; Console.WriteLine(Username + "> Licytuje: pas"); PerformServerAction("bid", data.GetApiObject(), null, null); } }