Recent

Author Topic: [SOLVED] wildcard utilities list  (Read 647 times)

mas steindorff

  • Hero Member
  • *****
  • Posts: 594
[SOLVED] wildcard utilities list
« Reply #15 on: May 20, 2026, 08:21:18 am »
new straight code:  (where is the "that was easy" button in the IDE :) )
just incase someone is about to respond to my post above...
Both the "remove duplicates" and .AddAce_as_one() where easy once I made TcardList a class (below) and then just added the code to that class.
Code: Pascal  [Select][+][-]
  1.  
  2. TCardListBase = specialize TFPGList<TCard>; // list of cards
  3.  
  4.   TCardList = class(TCardListBase)
  5.      procedure Sort_KillRankDups;  // remove rank duplicates for straight testing
  6.      procedure AddAce_as_one();
  7.   private
  8.    end;
  9.  
for every Ace (rank 14) i find in the hand, I add a ace (rank 1) and the same code I posted above works. the extra cards are tossed since I work with a copy of the hand.
At this point I have everything. (until I address odds)
thankyou all
MAS
windows 10 &11, Ubuntu 21+ IDE 3.4 general releases

 

TinyPortal © 2005-2018