public override void HandleBidDone(Seats source, Bid bid)
 {
     if (bid == null)
     {
         throw new ArgumentNullException("bid");
     }
     Log.Trace(4, "{2}.BoardResultRecorder.HandleBidDone: {0} bid {1}", source, bid.ToXML(), this.Owner);
     if (!bid.Hint)
     {
         this.theAuction.Record(bid.Clone());
         if (this.theAuction.Ended)
         {
             this.thePlay = new PlaySequence(this.theAuction.FinalContract, 13);
         }
     }
 }
Esempio n. 2
0
        public PlaySequence Clone()
        {
            PlaySequence n = (PlaySequence)MemberwiseClone();

            n.play = new Collection <PlayRecord>();
            for (int i = 0; i <= lastPlay; i++)
            {
                n.play.Add(play[i]);
            }

            n.finalContract = this.finalContract.Clone();
            n.finalContract.tricksForDefense++;
            if (n.finalContract.tricksForDefense == this.finalContract.tricksForDefense)
            {
                throw new FatalBridgeException("PlaySequence.Clone: finalContract");
            }
            n.finalContract.tricksForDefense--;
            return(n);
        }