Releases: ImperialBower/cardpack.rs
Releases · ImperialBower/cardpack.rs
Lowercase Index Strings BUGFIX
v0.4.12 version 0.4.12
Lowercase Index Strings
Added support for lower case rank index strings, i.e. ah qh ac qd 9d 4h 8h 5h 3d
.
Pile Frequency Sort
Card Piles now have the ability to be sorted based on the frequency of the Cards in the Pile.
Sort by Rank
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
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
v0.4.6 version 0.4.6
Set Clippy to Pedantic
v0.4.5 Version 0.4.5
Short Index and Bridge Compass Displays
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
v0.4.2 Version 0.4.2
Cleaned up crate
v0.4.1 version 0.4.1