private void GameOnPlayerBid(BidEventArgs bidEventArgs)
        {
            this.Contract = bidEventArgs.CurrentContract;
            this.Draw();

            if (bidEventArgs.Position == this.Position)
            {
                // Current player bid event
                return;
            }

            if (bidEventArgs.Position == PlayerPosition.East)
            {
                ConsoleHelper.DrawTextBoxTopRight(bidEventArgs.Bid.ToString(), 80 - 2 - this.Game[PlayerPosition.East].Name.Length - 2, 8);
            }

            if (bidEventArgs.Position == PlayerPosition.North)
            {
                ConsoleHelper.DrawTextBoxTopLeft(bidEventArgs.Bid.ToString(), 40 - (bidEventArgs.Bid.ToString().Length / 2), 4);
            }

            if (bidEventArgs.Position == PlayerPosition.West)
            {
                ConsoleHelper.DrawTextBoxTopLeft(bidEventArgs.Bid.ToString(), this.Game[PlayerPosition.West].Name.Length + 3, 8);
            }

            ConsoleHelper.WriteOnPosition(string.Format("{0} from {1} ({2} player)", bidEventArgs.Bid, this.Game[bidEventArgs.Position].Name, bidEventArgs.Position), 0, Settings.ConsoleHeight - 3);
            ConsoleHelper.WriteOnPosition("Press enter to continue...", 0, Settings.ConsoleHeight - 2);
            Console.ReadLine();
        }
 private void AddBid(BidEventArgs eventArgs)
 {
     if (this.allBids.Count == 0)
     {
         this.startsFirst = eventArgs.Position;
     }
     if (eventArgs.Position == this.MyPartnerPosition && eventArgs.Bid != BidType.Pass)
     {
         this.partnerBids.Add(eventArgs.Bid);
     }
     else if (!this.Position.Equals(eventArgs.Position) && eventArgs.Bid != BidType.Pass)
     {
         this.otherBids.Add(eventArgs.Bid);
     }
     this.allBids.Add(eventArgs.Bid);
 }
Пример #3
0
 private static void GameInfoOnPlayerBid(BidEventArgs eventArgs)
 {
     //Console.WriteLine("{1} from {0}", eventArgs.Position, eventArgs.Bid);
     ////Console.ReadKey();
 }
Пример #4
0
        private void Game_PlayerBid(BidEventArgs e)
        {
            this.Draw();
            if (e.Position != this.Position)
            {
                if (e.Position == PlayerPosition.East)
                {
                    ConsoleHelper.DrawTextBoxTopRight(e.Bid.ToString(), 80 - 2 - this.Game[PlayerPosition.East].Name.Length - 2, 7);
                }

                if (e.Position == PlayerPosition.North)
                {
                    ConsoleHelper.DrawTextBoxTopLeft(e.Bid.ToString(), 40 - 2 - e.Bid.ToString().Length / 2, 2);
                }

                if (e.Position == PlayerPosition.West)
                {
                    ConsoleHelper.DrawTextBoxTopLeft(e.Bid.ToString(), this.Game[PlayerPosition.West].Name.Length + 3, 7);
                }

                ConsoleHelper.WriteOnPosition(string.Format("{0} from {1} player", e.Bid, e.Position), 0, 18);
                ConsoleHelper.WriteOnPosition("Press enter to continue...", 0, 19);
                Console.ReadLine();
            }
        }