public override void Play() { base.Play(); if (Game.GameState == GameState.STARTING) { var data = new StartGameActionRequestSerializer() { Username = Username, PlaceTag = (int)Position }; PerformServerAction("start-game", data.GetApiObject(), null, null); } }
public virtual void Play() { ClientSocket.UpdateCommunication(); if (Game.GameState == GameState.STARTING) { var data = new StartGameActionRequestSerializer() { Username = Username, PlaceTag = (int)Position }; PerformServerAction("start-game", data.GetApiObject(), null, null); } if (SendGetHandRequest) { GetHand(); } switch (Game.GameState) { case GameState.BIDDING: playing = false; PlayBidding(); break; case GameState.PLAYING: if (playing == false) { playing = true; bool defense = true; if ((int)Game.CurrentGame.Declarer == (int)Position || (int)Game.CurrentGame.Declarer == ((int)Position + 2) % 4) { defense = false; } AILogic.SetColorPriorityList((int)Game.CurrentGame.ContractColor + 1, defense); } PlayPlaying(); break; } }