feat!: add Card(u32) newtype and Hand changed to Cards(Vec<Card>) newtype
authorMA Beaudet <ma@beaudet.xyz>
Sat, 6 Nov 2021 16:23:36 +0000 (17:23 +0100)
committerMA Beaudet <ma@beaudet.xyz>
Sat, 6 Nov 2021 16:40:18 +0000 (17:40 +0100)
commit90cc49e7ae32824d80293a65fe5800bff53a187a
tree8e8d4ac777c1d882ec78868fb78fbb14c1310f91
parente17d4cd99715238ebe15dbcf7d49373797c7372a
feat!: add Card(u32) newtype and Hand changed to Cards(Vec<Card>) newtype

`Hand` struct changed from Hand { cards } to newtype Cards(Vec<Card>)
Cards and Card both implement std::str::FromStr and std::fmt::Display.
Card implements TryForm<u32> PartialEq and PartialOrd (compares ranks)
Card provides get(), suit() and rank() methods, mostly helpers for
std::fmt::Display
Cards now implements init_deck(), shuffle_cards() and removen(name might
change)
Simulation example updated
examples/simulation.rs
src/lib.rs