Skip to content

Releases: ImperialBower/cardpack.rs

Lowercase Index Strings BUGFIX

19 Jan 04:26
6603a88
Compare
Choose a tag to compare
v0.4.12

version 0.4.12

Lowercase Index Strings

19 Jan 04:12
Compare
Choose a tag to compare

Added support for lower case rank index strings, i.e. ah qh ac qd 9d 4h 8h 5h 3d.

Pile Frequency Sort

12 Jan 22:25
390def0
Compare
Choose a tag to compare

Card Piles now have the ability to be sorted based on the frequency of the Cards in the Pile.

Sort by Rank

11 Jan 01:50
74dfa07
Compare
Choose a tag to compare

Added the ability of a Pile of Cards to be sorted with priority given to Rank over Suit. So K♥ A♥ A♠ K♠ would return A♠ A♥ K♠ K♥ instead of A♠ K♠ A♥ K♥.

Tweaks

05 Jan 01:33
4514d8b
Compare
Choose a tag to compare

Some changes to Card in order to facilitate future work.
Added Standard52Set as a way to play around with ways to verify that a card isn't duplicated in a Deck.

Upgraded Dependencies

18 Dec 16:06
bd582f4
Compare
Choose a tag to compare
v0.4.6

version 0.4.6

Set Clippy to Pedantic

18 Dec 02:50
546c7b3
Compare
Choose a tag to compare
v0.4.5

Version 0.4.5

Short Index and Bridge Compass Displays

15 Dec 03:05
Compare
Choose a tag to compare

Added the ability to do Bridge Compass style displays:

❯ cargo run --example  bridge
   Compiling cardpack v0.4.3 (/Users/christoph/src/github.com/ContractBridge/cardpack.rs)
    Finished dev [unoptimized + debuginfo] target(s) in 1.97s
     Running `target/debug/examples/bridge`
First, let's deal out a Bridge hand:
                NORTH
             ♠ A K J T 4 2
             ♥ T 6 4
             ♦ J 4
             ♣ 7 4

       WEST                  EAST
    ♠ 3                   ♠ Q 7 6 5
    ♥ 5                   ♥ 9 8 7 2
    ♦ K Q T 9 8 6         ♦ 5 3
    ♣ K 9 6 5 2           ♣ Q 8 3

                 SOUTH
              ♠ 9 8
              ♥ A K Q J 3
              ♦ A 7 2
              ♣ A J T



We can also take the board and convert it to a Portable Bridge Notation Deal String:
[Deal "S:98.AKQJ3.A72.AJT 3.5.KQT986.K9652 AKJT42.T64.J4.74 Q765.9872.53.Q83"]


Now, let's take a PBN Deal String and convert it into Bridge hands (packs):
[Deal "S:Q42.Q52.AQT943.Q 97.AT93.652.T743 AJT85.J76.KJ.A65 K63.K84.87.KJ982"]

Let's print it out simply:
S: Q♠ 4♠ 2♠ Q♥ 5♥ 2♥ A♦ Q♦ T♦ 9♦ 4♦ 3♦ Q♣
W: 9♠ 7♠ A♥ T♥ 9♥ 3♥ 6♦ 5♦ 2♦ T♣ 7♣ 4♣ 3♣
N: A♠ J♠ T♠ 8♠ 5♠ J♥ 7♥ 6♥ K♦ J♦ A♣ 6♣ 5♣
E: K♠ 6♠ 3♠ K♥ 8♥ 4♥ 8♦ 7♦ K♣ J♣ 9♣ 8♣ 2♣

Let's print it out in a compass format:
                NORTH
             ♠ A J T 8 5
             ♥ J 7 6
             ♦ K J
             ♣ A 6 5

       WEST              EAST
    ♠ 9 7             ♠ K 6 3
    ♥ A T 9 3         ♥ K 8 4
    ♦ 6 5 2           ♦ 8 7
    ♣ T 7 4 3         ♣ K J 9 8 2

               SOUTH
            ♠ Q 4 2
            ♥ Q 5 2
            ♦ A Q T 9 4 3
            ♣ Q

Standard 52 with Serialization and Deserialization

11 Dec 22:03
30c6da4
Compare
Choose a tag to compare

Cleaned up crate

05 Dec 17:36
Compare
Choose a tag to compare
v0.4.1

version 0.4.1