From 43b1ef20f2b3738b91b05bd7a2d8c69bdc01c88e Mon Sep 17 00:00:00 2001 From: Geoffrey Allott Date: Thu, 8 Jun 2023 00:21:06 +0100 Subject: [PATCH] update cribbage scoring display to be more clear about the reason a hand was scored --- src/game/cribbage/mod.rs | 222 ++++++++++++++++++------------------- src/game/cribbage/score.rs | 148 ++++++++++++------------- 2 files changed, 185 insertions(+), 185 deletions(-) diff --git a/src/game/cribbage/mod.rs b/src/game/cribbage/mod.rs index ad51a7e..5f1ff8a 100644 --- a/src/game/cribbage/mod.rs +++ b/src/game/cribbage/mod.rs @@ -580,7 +580,7 @@ mod tests { {"timestamp":1685568658533,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685568658531,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685568658532,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, - {"timestamp":1685568658563,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685568658563,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685568658567,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685568658565,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685568658568,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, @@ -614,11 +614,11 @@ mod tests { {"timestamp":1685653387245,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":2,"reason":"Fifteen for two"}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Hearts"}}}, - {"timestamp":1685653387245,"username":"Geoff","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1685653387245,"username":"Geoff","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Hearts"}}}, - {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":4,"reason":"Thirty-one for two and two is four"}}, + {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":4,"reason":"Thirty-one for two and a pair is four"}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, @@ -626,17 +626,17 @@ mod tests { {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Diamonds"}}}, - {"timestamp":1685653387245,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685653387245,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, - {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and three is 7"}}, + {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and a run of three is 7"}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, - {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and three is 9"}}, + {"timestamp":1685653387245,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and a run of three is 9"}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"WinGame"}} ]"#; @@ -679,7 +679,7 @@ mod tests { {"timestamp":1685308376249,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1685308376249,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685308376249,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Diamonds"}}}, - {"timestamp":1685308376249,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685308376249,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685308376249,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"King","suit":"Spades"}}}, {"timestamp":1685308376249,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685308376249,"username":"Geoff","action":{"action":"Pass"}}, @@ -695,17 +695,17 @@ mod tests { {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, - {"timestamp":1685308376249,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and four is 8"}}, + {"timestamp":1685308376249,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and a run of four is 8"}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Clubs"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1685308376249,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and six is 14"}}, + {"timestamp":1685308376249,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and three-of-a-kind for six is 14"}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Diamonds"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685653387245,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, - {"timestamp":1685308376249,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six and six is 12"}}, + {"timestamp":1685308376249,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six and three-of-a-kind for six is 12"}}, {"timestamp":1685308376248,"username":"Geoff","action":{"action":"WinGame"}} ]"#; @@ -748,7 +748,7 @@ mod tests { {"timestamp":1685913110003,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685913110004,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Fifteen for two"}}, {"timestamp":1685913125371,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Spades"}}}, - {"timestamp":1685913125372,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685913125372,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685913133659,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1685913140290,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685913186735,"username":"Geoff","action":{"action":"Pass"}}, @@ -762,17 +762,17 @@ mod tests { {"timestamp":1685913211785,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685913211786,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685913211786,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, - {"timestamp":1685913211787,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and three is 9"}}, + {"timestamp":1685913211787,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and a run of three is 9"}}, {"timestamp":1685913211787,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685913211788,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685913211788,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1685913211789,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, - {"timestamp":1685913211790,"username":"Geoff","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four and five is 9"}}, + {"timestamp":1685913211790,"username":"Geoff","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four and a run of five is 9"}}, {"timestamp":1685913211792,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1685913211793,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, {"timestamp":1685913211794,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685913211795,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Hearts"}}}, - {"timestamp":1685913211807,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six and three and one for his nob is 10"}}, + {"timestamp":1685913211807,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six and a run of three and one for his nob is 10"}}, {"timestamp":1685913211808,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685913211809,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1685913211810,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"King","suit":"Diamonds"}}}, @@ -802,7 +802,7 @@ mod tests { {"timestamp":1685913418255,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1685913419971,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685913421544,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Hearts"}}}, - {"timestamp":1685913421545,"username":"Geoff","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1685913421545,"username":"Geoff","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1685913426272,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685913426274,"username":"Geoff","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685913429058,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Spades"}}}, @@ -811,12 +811,12 @@ mod tests { {"timestamp":1685913429061,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1685913429061,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1685913429062,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, - {"timestamp":1685913429062,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Eight"}}, + {"timestamp":1685913429062,"username":"Geoff","action":{"action":"Score","points":8,"reason":"A double-run for eight"}}, {"timestamp":1685913429063,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685913429064,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, {"timestamp":1685913429065,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685913429066,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1685913429067,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685913429067,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685913429068,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685913429068,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685913429069,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, @@ -849,24 +849,24 @@ mod tests { {"timestamp":1685913971911,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1685913974184,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685913978052,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Diamonds"}}}, - {"timestamp":1685913978054,"username":"Aga","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1685913978054,"username":"Aga","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1685913984049,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Spades"}}}, - {"timestamp":1685913984050,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Four and a go is five"}}, + {"timestamp":1685913984050,"username":"Geoff","action":{"action":"Score","points":5,"reason":"A run of four and a go is five"}}, {"timestamp":1685913984051,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685913984051,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1685913984052,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1685913984052,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, - {"timestamp":1685913984053,"username":"Aga","action":{"action":"Score","points":5,"reason":"Fifteen two and two and one for his nob is 5"}}, + {"timestamp":1685913984053,"username":"Aga","action":{"action":"Score","points":5,"reason":"Fifteen two and a pair and one for his nob is 5"}}, {"timestamp":1685913984053,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685913984054,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685913984054,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, {"timestamp":1685913984056,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1685913984056,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and four is 8"}}, + {"timestamp":1685913984056,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and a flush for four is 8"}}, {"timestamp":1685913984057,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685913984057,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Diamonds"}}}, {"timestamp":1685913984058,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685913984058,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, - {"timestamp":1685913984059,"username":"Geoff","action":{"action":"Score","points":16,"reason":"Sixteen"}}, + {"timestamp":1685913984059,"username":"Geoff","action":{"action":"Score","points":16,"reason":"A quadruple-run for sixteen"}}, {"timestamp":1685913984059,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685913984060,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Ace","suit":"Spades"}}}, {"timestamp":1685913984060,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Queen","suit":"Hearts"}}}, @@ -888,7 +888,7 @@ mod tests { {"timestamp":1685914093013,"username":"Aga","action":{"action":"CommunityCard","card":{"rank":"Two","suit":"Diamonds"}}}, {"timestamp":1685914096913,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Jack","suit":"Diamonds"}}}, {"timestamp":1685914100829,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Jack","suit":"Hearts"}}}, - {"timestamp":1685914100831,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685914100831,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685914104232,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"King","suit":"Clubs"}}}, {"timestamp":1685914106976,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685914108318,"username":"Geoff","action":{"action":"Pass"}}, @@ -902,22 +902,22 @@ mod tests { {"timestamp":1685914124102,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685914126904,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1685914128930,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1685914128931,"username":"Aga","action":{"action":"Score","points":3,"reason":"Two and a go is three"}}, + {"timestamp":1685914128931,"username":"Aga","action":{"action":"Score","points":3,"reason":"A pair and a go is three"}}, {"timestamp":1685914128932,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685914128933,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Diamonds"}}}, {"timestamp":1685914128934,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1685914128936,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Clubs"}}}, - {"timestamp":1685914128937,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six and three and one for his nob is 10"}}, + {"timestamp":1685914128937,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six and a run of three and one for his nob is 10"}}, {"timestamp":1685914128938,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685914128938,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1685914128939,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1685914128940,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1685914128940,"username":"Aga","action":{"action":"Score","points":8,"reason":"Eight"}}, + {"timestamp":1685914128940,"username":"Aga","action":{"action":"Score","points":8,"reason":"A double-run for eight"}}, {"timestamp":1685914128941,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685914128942,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685914128953,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Hearts"}}}, {"timestamp":1685914128954,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1685914128955,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1685914128955,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1685914128956,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1685914128957,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685914128960,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Two","suit":"Hearts"}}}, @@ -940,12 +940,12 @@ mod tests { {"timestamp":1685914201453,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1685914203297,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1685914205236,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Hearts"}}}, - {"timestamp":1685914205238,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685914205238,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685914207574,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685914210760,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685914213096,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Diamonds"}}}, {"timestamp":1685914215055,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Clubs"}}}, - {"timestamp":1685914215056,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685914215056,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685914218934,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Hearts"}}}, {"timestamp":1685914218935,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Thirty-one for two"}} ]"#; @@ -1002,12 +1002,12 @@ mod tests { {"timestamp":1685915684635,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685915684636,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685915684637,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, - {"timestamp":1685915684638,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and eight is 14"}}, + {"timestamp":1685915684638,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and a double-run for eight is 14"}}, {"timestamp":1685915684639,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685915684641,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1685915684642,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, {"timestamp":1685915684643,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, - {"timestamp":1685915684644,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and three is 9"}}, + {"timestamp":1685915684644,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and a run of three is 9"}}, {"timestamp":1685915684651,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685915684652,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1685915684654,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, @@ -1048,7 +1048,7 @@ mod tests { {"timestamp":1685915779840,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685915779841,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1685915779841,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, - {"timestamp":1685915779842,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two and two and three is 7"}}, + {"timestamp":1685915779842,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two and a pair and a run of three is 7"}}, {"timestamp":1685915779843,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Diamonds"}}}, {"timestamp":1685915779844,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685915779845,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, @@ -1058,7 +1058,7 @@ mod tests { {"timestamp":1685915779848,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685915779848,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Hearts"}}}, {"timestamp":1685915779862,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1685915779863,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685915779863,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685915779864,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685915779871,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685915779872,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"King","suit":"Hearts"}}}, @@ -1084,7 +1084,7 @@ mod tests { {"timestamp":1685915909656,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1685915910972,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Hearts"}}}, {"timestamp":1685915912312,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Clubs"}}}, - {"timestamp":1685915912313,"username":"Aga","action":{"action":"Score","points":4,"reason":"Thirty-one for two and two is four"}}, + {"timestamp":1685915912313,"username":"Aga","action":{"action":"Score","points":4,"reason":"Thirty-one for two and a pair is four"}}, {"timestamp":1685915917121,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685915918657,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Hearts"}}}, {"timestamp":1685915918659,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, @@ -1092,17 +1092,17 @@ mod tests { {"timestamp":1685915918660,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Spades"}}}, {"timestamp":1685915918660,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685915918661,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, - {"timestamp":1685915918661,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two and three and one for his nob is 6"}}, + {"timestamp":1685915918661,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two and a run of three and one for his nob is 6"}}, {"timestamp":1685915918662,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685915918662,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1685915918663,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685915918664,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Hearts"}}}, - {"timestamp":1685915918665,"username":"Aga","action":{"action":"Score","points":10,"reason":"Ten"}}, + {"timestamp":1685915918665,"username":"Aga","action":{"action":"Score","points":10,"reason":"A double-run for ten"}}, {"timestamp":1685915918665,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685915918666,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685915918667,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, {"timestamp":1685915918667,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1685915918668,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685915918668,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685915918668,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1685915918680,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685915918681,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Queen","suit":"Spades"}}}, @@ -1139,17 +1139,17 @@ mod tests { {"timestamp":1685915996818,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685915996818,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685915996819,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, - {"timestamp":1685915996819,"username":"Aga","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four and ten is 14"}}, + {"timestamp":1685915996819,"username":"Aga","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four and a double-run for ten is 14"}}, {"timestamp":1685915996820,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685915996821,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1685915996821,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1685915996822,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, - {"timestamp":1685915996823,"username":"Geoff","action":{"action":"Score","points":9,"reason":"Eight and one for his nob is 9"}}, + {"timestamp":1685915996823,"username":"Geoff","action":{"action":"Score","points":9,"reason":"A double-run for eight and one for his nob is 9"}}, {"timestamp":1685915996823,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685915996824,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685915996824,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1685915996825,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1685915996826,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1685915996826,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1685915996826,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685915996836,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685915996836,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Five","suit":"Hearts"}}}, @@ -1186,7 +1186,7 @@ mod tests { {"timestamp":1685916085470,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Diamonds"}}}, {"timestamp":1685916085471,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685916085471,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, - {"timestamp":1685916085472,"username":"Geoff","action":{"action":"Score","points":13,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two and two and one for his nob is 13"}}, + {"timestamp":1685916085472,"username":"Geoff","action":{"action":"Score","points":13,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two pairs and one for his nob is 13"}}, {"timestamp":1685916085473,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Hearts"}}}, {"timestamp":1685916085474,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685916085475,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Diamonds"}}}, @@ -1196,7 +1196,7 @@ mod tests { {"timestamp":1685916085490,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685916085490,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685916085491,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Hearts"}}}, - {"timestamp":1685916085492,"username":"Aga","action":{"action":"Score","points":4,"reason":"Two and two"}}, + {"timestamp":1685916085492,"username":"Aga","action":{"action":"Score","points":4,"reason":"Two pairs"}}, {"timestamp":1685916085492,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1685916085494,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1685916085495,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Five","suit":"Spades"}}}, @@ -1232,7 +1232,7 @@ mod tests { {"timestamp":1685916152300,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Spades"}}}, {"timestamp":1685916152301,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1685916152301,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, - {"timestamp":1685916152302,"username":"Aga","action":{"action":"Score","points":5,"reason":"Two and two and one for his nob is 5"}}, + {"timestamp":1685916152302,"username":"Aga","action":{"action":"Score","points":5,"reason":"Two pairs and one for his nob is 5"}}, {"timestamp":1685916152303,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685916152303,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685916152304,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Clubs"}}}, @@ -1242,7 +1242,7 @@ mod tests { {"timestamp":1685916152307,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Hearts"}}}, {"timestamp":1685916152308,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1685916152308,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, - {"timestamp":1685916152309,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Six"}}, + {"timestamp":1685916152309,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Three-of-a-kind for six"}}, {"timestamp":1685916152310,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685916152320,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Jack","suit":"Spades"}}}, {"timestamp":1685916152321,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Queen","suit":"Clubs"}}}, @@ -1271,19 +1271,19 @@ mod tests { {"timestamp":1685916510051,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Thirty-one for two"}}, {"timestamp":1685916516037,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1685916516999,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Spades"}}}, - {"timestamp":1685916517001,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685916517001,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685916519284,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"King","suit":"Spades"}}}, {"timestamp":1685916519285,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685916519286,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685916519286,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685916519287,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1685916519288,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, - {"timestamp":1685916519289,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and four is 8"}}, + {"timestamp":1685916519289,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and a run of four is 8"}}, {"timestamp":1685916519289,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685916519290,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1685916519290,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, {"timestamp":1685916519291,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1685916519292,"username":"Aga","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two is 10"}}, + {"timestamp":1685916519292,"username":"Aga","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and a pair is 10"}}, {"timestamp":1685916519292,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685916519293,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685916519294,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, @@ -1316,24 +1316,24 @@ mod tests { {"timestamp":1685916604391,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685916605974,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Diamonds"}}}, {"timestamp":1685916607234,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Spades"}}}, - {"timestamp":1685916607235,"username":"Aga","action":{"action":"Score","points":5,"reason":"Thirty-one for two and three is five"}}, + {"timestamp":1685916607235,"username":"Aga","action":{"action":"Score","points":5,"reason":"Thirty-one for two and a run of three is five"}}, {"timestamp":1685916615507,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1685916615509,"username":"Geoff","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685916615510,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685916615511,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685916615512,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685916615513,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Spades"}}}, - {"timestamp":1685916615514,"username":"Aga","action":{"action":"Score","points":12,"reason":"Fifteen two and ten is 12"}}, + {"timestamp":1685916615514,"username":"Aga","action":{"action":"Score","points":12,"reason":"Fifteen two and a double-run for ten is 12"}}, {"timestamp":1685916615514,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1685916615516,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1685916615517,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1685916615517,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Diamonds"}}}, - {"timestamp":1685916615518,"username":"Geoff","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and three is 7"}}, + {"timestamp":1685916615518,"username":"Geoff","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and a run of three is 7"}}, {"timestamp":1685916615519,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685916615529,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1685916615531,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1685916615531,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1685916615532,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and three and one for his nob is 8"}}, + {"timestamp":1685916615532,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and a run of three and one for his nob is 8"}}, {"timestamp":1685916615532,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685916615533,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685916615534,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Ace","suit":"Spades"}}}, @@ -1356,9 +1356,9 @@ mod tests { {"timestamp":1685916868477,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1685916870395,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685916872313,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Hearts"}}}, - {"timestamp":1685916872314,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685916872314,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685916875363,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Diamonds"}}}, - {"timestamp":1685916875365,"username":"Aga","action":{"action":"Score","points":6,"reason":"Six"}}, + {"timestamp":1685916875365,"username":"Aga","action":{"action":"Score","points":6,"reason":"Three-of-a-kind for six"}}, {"timestamp":1685916880053,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685916882256,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685916884916,"username":"Geoff","action":{"action":"Pass"}}, @@ -1371,12 +1371,12 @@ mod tests { {"timestamp":1685916894338,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1685916894339,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1685916894340,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, - {"timestamp":1685916894341,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six and six is 12"}}, + {"timestamp":1685916894341,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six and three-of-a-kind for six is 12"}}, {"timestamp":1685916894342,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Diamonds"}}}, {"timestamp":1685916894342,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685916894343,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685916894343,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, - {"timestamp":1685916894344,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685916894344,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685916894344,"username":"Aga","action":{"action":"WinGame"}} ]"#; @@ -1421,13 +1421,13 @@ mod tests { {"timestamp":1685917072590,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685917074725,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Hearts"}}}, {"timestamp":1685917076827,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Diamonds"}}}, - {"timestamp":1685917076828,"username":"Aga","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1685917076828,"username":"Aga","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1685917079845,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1685917081696,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685917081697,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685917137113,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1685917138661,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Hearts"}}}, - {"timestamp":1685917138662,"username":"Aga","action":{"action":"Score","points":3,"reason":"Two and a go is three"}}, + {"timestamp":1685917138662,"username":"Aga","action":{"action":"Score","points":3,"reason":"A pair and a go is three"}}, {"timestamp":1685917138663,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1685917138664,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1685917138664,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, @@ -1437,7 +1437,7 @@ mod tests { {"timestamp":1685917138667,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685917138667,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685917138668,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, - {"timestamp":1685917138668,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and two is 8"}}, + {"timestamp":1685917138668,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and a pair is 8"}}, {"timestamp":1685917138669,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685917138669,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1685917138670,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, @@ -1473,7 +1473,7 @@ mod tests { {"timestamp":1685917243970,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"King","suit":"Spades"}}}, {"timestamp":1685917244988,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Jack","suit":"Spades"}}}, {"timestamp":1685917245972,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1685917245973,"username":"Aga","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1685917245973,"username":"Aga","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1685917248182,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1685917248184,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685917252771,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Clubs"}}}, @@ -1482,17 +1482,17 @@ mod tests { {"timestamp":1685917252774,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1685917252775,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, {"timestamp":1685917252775,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1685917252776,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685917252776,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685917252776,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1685917252777,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685917252777,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1685917252778,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, - {"timestamp":1685917252778,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and eight is 14"}}, + {"timestamp":1685917252778,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and a double-run for eight is 14"}}, {"timestamp":1685917252779,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685917252780,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1685917252780,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1685917252781,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Hearts"}}}, - {"timestamp":1685917252781,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and four is 8"}}, + {"timestamp":1685917252781,"username":"Geoff","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four and a run of four is 8"}}, {"timestamp":1685917252782,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685917252782,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Five","suit":"Diamonds"}}}, {"timestamp":1685917252792,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Two","suit":"Clubs"}}}, @@ -1516,7 +1516,7 @@ mod tests { {"timestamp":1685917304161,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1685917304163,"username":"Aga","action":{"action":"Score","points":2,"reason":"Fifteen for two"}}, {"timestamp":1685917306637,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Diamonds"}}}, - {"timestamp":1685917306638,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685917306638,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685917312970,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685917314720,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685917316589,"username":"Aga","action":{"action":"Pass"}}, @@ -1530,17 +1530,17 @@ mod tests { {"timestamp":1685917322949,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685917322949,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1685917322949,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, - {"timestamp":1685917322950,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two is 10"}}, + {"timestamp":1685917322950,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and a pair is 10"}}, {"timestamp":1685917322951,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685917322951,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1685917322952,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685917322952,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, - {"timestamp":1685917322953,"username":"Aga","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four and eight is 12"}}, + {"timestamp":1685917322953,"username":"Aga","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four and a double-run for eight is 12"}}, {"timestamp":1685917322953,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685917322954,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1685917322955,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1685917322955,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, - {"timestamp":1685917322956,"username":"Aga","action":{"action":"Score","points":5,"reason":"Two and three"}}, + {"timestamp":1685917322956,"username":"Aga","action":{"action":"Score","points":5,"reason":"A pair and a run of three"}}, {"timestamp":1685917322956,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1685917322957,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685917322957,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Ten","suit":"Spades"}}}, @@ -1564,11 +1564,11 @@ mod tests { {"timestamp":1685917446922,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685917448233,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685917449583,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Diamonds"}}}, - {"timestamp":1685917449584,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Thirty-one for two and three is five"}}, + {"timestamp":1685917449584,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Thirty-one for two and a run of three is five"}}, {"timestamp":1685917456551,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685917457830,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1685917459252,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Spades"}}}, - {"timestamp":1685917459253,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685917459253,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685917463730,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1685917463731,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1685917464761,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Diamonds"}}}, @@ -1577,12 +1577,12 @@ mod tests { {"timestamp":1685917464764,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1685917464764,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Diamonds"}}}, {"timestamp":1685917464766,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, - {"timestamp":1685917464766,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and two is 8"}}, + {"timestamp":1685917464766,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and a pair is 8"}}, {"timestamp":1685917464767,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1685917464769,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, {"timestamp":1685917464770,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1685917464771,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, - {"timestamp":1685917464773,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Two and two"}}, + {"timestamp":1685917464773,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Two pairs"}}, {"timestamp":1685917464774,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Hearts"}}}, {"timestamp":1685917464792,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685917464793,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, @@ -1611,7 +1611,7 @@ mod tests { {"timestamp":1685917558692,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685917558693,"username":"Aga","action":{"action":"Score","points":2,"reason":"Fifteen for two"}}, {"timestamp":1685917562343,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Six","suit":"Spades"}}}, - {"timestamp":1685917562344,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1685917562344,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1685917565229,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685917569389,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1685917570500,"username":"Aga","action":{"action":"Pass"}}, @@ -1625,17 +1625,17 @@ mod tests { {"timestamp":1685917577093,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685917577094,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1685917577095,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, - {"timestamp":1685917577096,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two and two is 12"}}, + {"timestamp":1685917577096,"username":"Geoff","action":{"action":"Score","points":12,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two pairs is 12"}}, {"timestamp":1685917577097,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685917577097,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685917577098,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1685917577099,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, - {"timestamp":1685917577099,"username":"Aga","action":{"action":"Score","points":15,"reason":"Fifteen"}}, + {"timestamp":1685917577099,"username":"Aga","action":{"action":"Score","points":15,"reason":"A triple-run for fifteen"}}, {"timestamp":1685917577100,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Spades"}}}, {"timestamp":1685917577100,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1685917577102,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Hearts"}}}, {"timestamp":1685917577136,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Diamonds"}}}, - {"timestamp":1685917577137,"username":"Aga","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and six is 14"}}, + {"timestamp":1685917577137,"username":"Aga","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and three-of-a-kind for six is 14"}}, {"timestamp":1685917577139,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1685917577140,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685917577140,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Three","suit":"Clubs"}}}, @@ -1669,17 +1669,17 @@ mod tests { {"timestamp":1685917630691,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1685917630693,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1685917630694,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Diamonds"}}}, - {"timestamp":1685917630696,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and three is 7"}}, + {"timestamp":1685917630696,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and a run of three is 7"}}, {"timestamp":1685917630697,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685917630698,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1685917630699,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685917630701,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Clubs"}}}, - {"timestamp":1685917630717,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1685917630717,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1685917630719,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1685917630719,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1685917630721,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1685917630722,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1685917630724,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Fifteen two and two is 4"}}, + {"timestamp":1685917630724,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Fifteen two and a pair is 4"}}, {"timestamp":1685917630725,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1685917630727,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685917630728,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Three","suit":"Clubs"}}}, @@ -1705,7 +1705,7 @@ mod tests { {"timestamp":1685917857542,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685917858732,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1685917860394,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Three","suit":"Clubs"}}}, - {"timestamp":1685917860395,"username":"Aga","action":{"action":"Score","points":4,"reason":"Four"}}, + {"timestamp":1685917860395,"username":"Aga","action":{"action":"Score","points":4,"reason":"A run of four"}}, {"timestamp":1685917864041,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1685917865148,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1685917865149,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, @@ -1716,12 +1716,12 @@ mod tests { {"timestamp":1685917872083,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Hearts"}}}, {"timestamp":1685917872083,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1685917872084,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, - {"timestamp":1685917872085,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and eight is 14"}}, + {"timestamp":1685917872085,"username":"Geoff","action":{"action":"Score","points":14,"reason":"Fifteen two, fifteen four, fifteen six and a double-run for eight is 14"}}, {"timestamp":1685917872086,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Clubs"}}}, {"timestamp":1685917872086,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1685917872087,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Diamonds"}}}, {"timestamp":1685917872087,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, - {"timestamp":1685917872088,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and two and one for his nob is 7"}}, + {"timestamp":1685917872088,"username":"Aga","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and a pair and one for his nob is 7"}}, {"timestamp":1685917872089,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685917872089,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1685917872090,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, @@ -1760,7 +1760,7 @@ mod tests { {"timestamp":1685917933958,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1685917933959,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1685917933959,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, - {"timestamp":1685917933960,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and two is 8"}}, + {"timestamp":1685917933960,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and a pair is 8"}}, {"timestamp":1685917933972,"username":"Aga","action":{"action":"WinGame"}} ]"#; @@ -1814,17 +1814,17 @@ mod tests { {"timestamp":1686172340742,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1686172340743,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1686172340744,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Spades"}}}, - {"timestamp":1686172340744,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1686172340744,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1686172340745,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1686172340746,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1686172340747,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1686172340747,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Clubs"}}}, - {"timestamp":1686172340748,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and two is 10"}}, + {"timestamp":1686172340748,"username":"Geoff","action":{"action":"Score","points":10,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight and a pair is 10"}}, {"timestamp":1686172340748,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1686172340749,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Hearts"}}}, {"timestamp":1686172340749,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1686172340749,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, - {"timestamp":1686172340750,"username":"Geoff","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and three is 7"}}, + {"timestamp":1686172340750,"username":"Geoff","action":{"action":"Score","points":7,"reason":"Fifteen two, fifteen four and a run of three is 7"}}, {"timestamp":1686172340750,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1686172340751,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1686172340751,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Six","suit":"Hearts"}}}, @@ -1860,12 +1860,12 @@ mod tests { {"timestamp":1686172403678,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1686172403679,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Spades"}}}, {"timestamp":1686172403679,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1686172403680,"username":"Geoff","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and two and one for his nob is 9"}}, + {"timestamp":1686172403680,"username":"Geoff","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and a pair and one for his nob is 9"}}, {"timestamp":1686172403681,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1686172403681,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1686172403682,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1686172403682,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, - {"timestamp":1686172403683,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two and six is 8"}}, + {"timestamp":1686172403683,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two and three-of-a-kind for six is 8"}}, {"timestamp":1686172403683,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Spades"}}}, {"timestamp":1686172403684,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1686172403684,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, @@ -1905,7 +1905,7 @@ mod tests { {"timestamp":1686172510011,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Clubs"}}}, {"timestamp":1686172510012,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1686172510013,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, - {"timestamp":1686172510013,"username":"Aga","action":{"action":"Score","points":11,"reason":"Fifteen two, fifteen four, fifteen six and five is 11"}}, + {"timestamp":1686172510013,"username":"Aga","action":{"action":"Score","points":11,"reason":"Fifteen two, fifteen four, fifteen six and a flush for five is 11"}}, {"timestamp":1686172510014,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Spades"}}}, {"timestamp":1686172510015,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1686172510015,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Hearts"}}}, @@ -1915,7 +1915,7 @@ mod tests { {"timestamp":1686172510017,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1686172510018,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1686172510019,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, - {"timestamp":1686172510020,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686172510020,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686172510020,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1686172510021,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"King","suit":"Clubs"}}}, {"timestamp":1686172510021,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Four","suit":"Hearts"}}}, @@ -1944,7 +1944,7 @@ mod tests { {"timestamp":1686172573453,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1686172574530,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Hearts"}}}, {"timestamp":1686172576040,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Clubs"}}}, - {"timestamp":1686172576041,"username":"Aga","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1686172576041,"username":"Aga","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1686172579776,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1686172579777,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Thirty-one for two"}}, {"timestamp":1686172580822,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Clubs"}}}, @@ -1953,12 +1953,12 @@ mod tests { {"timestamp":1686172580824,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1686172580825,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Clubs"}}}, {"timestamp":1686172580825,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1686172580826,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Two and two"}}, + {"timestamp":1686172580826,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Two pairs"}}, {"timestamp":1686172580827,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1686172580827,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1686172580828,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1686172580828,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Spades"}}}, - {"timestamp":1686172580829,"username":"Aga","action":{"action":"Score","points":16,"reason":"Fifteen two, fifteen four, fifteen six and ten is 16"}}, + {"timestamp":1686172580829,"username":"Aga","action":{"action":"Score","points":16,"reason":"Fifteen two, fifteen four, fifteen six and a double-run for ten is 16"}}, {"timestamp":1686172580830,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Hearts"}}}, {"timestamp":1686172580830,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1686172580830,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, @@ -1997,17 +1997,17 @@ mod tests { {"timestamp":1686172670616,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Diamonds"}}}, {"timestamp":1686172670617,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Hearts"}}}, {"timestamp":1686172670618,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1686172670618,"username":"Aga","action":{"action":"Score","points":6,"reason":"Six"}}, + {"timestamp":1686172670618,"username":"Aga","action":{"action":"Score","points":6,"reason":"Three-of-a-kind for six"}}, {"timestamp":1686172670619,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1686172670619,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Diamonds"}}}, {"timestamp":1686172670620,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, {"timestamp":1686172670620,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"King","suit":"Clubs"}}}, - {"timestamp":1686172670621,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Six"}}, + {"timestamp":1686172670621,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Three-of-a-kind for six"}}, {"timestamp":1686172670621,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Diamonds"}}}, {"timestamp":1686172670622,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Diamonds"}}}, {"timestamp":1686172670622,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Diamonds"}}}, {"timestamp":1686172670623,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, - {"timestamp":1686172670624,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1686172670624,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1686172670624,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1686172670625,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1686172670626,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Three","suit":"Spades"}}}, @@ -2044,17 +2044,17 @@ mod tests { {"timestamp":1686172752241,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1686172752241,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1686172752242,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Diamonds"}}}, - {"timestamp":1686172752242,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Fifteen two and three is 5"}}, + {"timestamp":1686172752242,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Fifteen two and a run of three is 5"}}, {"timestamp":1686172752243,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1686172752244,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1686172752244,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Hearts"}}}, {"timestamp":1686172752245,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1686172752245,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and three is 9"}}, + {"timestamp":1686172752245,"username":"Aga","action":{"action":"Score","points":9,"reason":"Fifteen two, fifteen four, fifteen six and a run of three is 9"}}, {"timestamp":1686172752246,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1686172752247,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Hearts"}}}, {"timestamp":1686172752247,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, {"timestamp":1686172752248,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Diamonds"}}}, - {"timestamp":1686172752248,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and two is 8"}}, + {"timestamp":1686172752248,"username":"Aga","action":{"action":"Score","points":8,"reason":"Fifteen two, fifteen four, fifteen six and a pair is 8"}}, {"timestamp":1686172752249,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1686172752250,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1686172752250,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Seven","suit":"Hearts"}}}, @@ -2077,13 +2077,13 @@ mod tests { {"timestamp":1686172815987,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1686172818505,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Hearts"}}}, {"timestamp":1686172820225,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Diamonds"}}}, - {"timestamp":1686172820226,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686172820226,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686172823553,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1686172823554,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Thirty-one for two"}}, {"timestamp":1686172830125,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Nine","suit":"Hearts"}}}, {"timestamp":1686172831542,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1686172832677,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Seven","suit":"Spades"}}}, - {"timestamp":1686172832678,"username":"Aga","action":{"action":"Score","points":3,"reason":"Three"}}, + {"timestamp":1686172832678,"username":"Aga","action":{"action":"Score","points":3,"reason":"A run of three"}}, {"timestamp":1686172835911,"username":"Geoff","action":{"action":"Pass"}}, {"timestamp":1686172835912,"username":"Aga","action":{"action":"Score","points":1,"reason":"One for a go"}}, {"timestamp":1686172839051,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Hearts"}}}, @@ -2092,12 +2092,12 @@ mod tests { {"timestamp":1686172839054,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1686172839054,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, {"timestamp":1686172839055,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Hearts"}}}, - {"timestamp":1686172839055,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two and two and two is 6"}}, + {"timestamp":1686172839055,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two and two pairs is 6"}}, {"timestamp":1686172839056,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Hearts"}}}, {"timestamp":1686172839056,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Hearts"}}}, {"timestamp":1686172839057,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Spades"}}}, {"timestamp":1686172839057,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, - {"timestamp":1686172839058,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1686172839058,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1686172839058,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Diamonds"}}}, {"timestamp":1686172839059,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Four","suit":"Clubs"}}}, {"timestamp":1686172839060,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Hearts"}}}, @@ -2136,17 +2136,17 @@ mod tests { {"timestamp":1686172912115,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1686172912115,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1686172912116,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1686172912117,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Fifteen two and three is 5"}}, + {"timestamp":1686172912117,"username":"Geoff","action":{"action":"Score","points":5,"reason":"Fifteen two and a run of three is 5"}}, {"timestamp":1686172912117,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1686172912118,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Spades"}}}, {"timestamp":1686172912118,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Jack","suit":"Clubs"}}}, {"timestamp":1686172912119,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Spades"}}}, - {"timestamp":1686172912119,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686172912119,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686172912120,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Clubs"}}}, {"timestamp":1686172912121,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Clubs"}}}, {"timestamp":1686172912121,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Eight","suit":"Diamonds"}}}, {"timestamp":1686172912122,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"King","suit":"Hearts"}}}, - {"timestamp":1686172912122,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1686172912122,"username":"Aga","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1686172912123,"username":"Geoff","action":{"action":"NextToDeal"}}, {"timestamp":1686172912123,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1686172912124,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Seven","suit":"Hearts"}}}, @@ -2174,25 +2174,25 @@ mod tests { {"timestamp":1686172971961,"username":"Aga","action":{"action":"Pass"}}, {"timestamp":1686172974106,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Diamonds"}}}, {"timestamp":1686173011382,"username":"Geoff","action":{"action":"PlayCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1686173011383,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686173011383,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686173015507,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1686173016640,"username":"Aga","action":{"action":"PlayCard","card":{"rank":"Ten","suit":"Clubs"}}}, - {"timestamp":1686173016641,"username":"Aga","action":{"action":"Score","points":3,"reason":"Two and a go is three"}}, + {"timestamp":1686173016641,"username":"Aga","action":{"action":"Score","points":3,"reason":"A pair and a go is three"}}, {"timestamp":1686173016642,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Hearts"}}}, {"timestamp":1686173016642,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Clubs"}}}, {"timestamp":1686173016643,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1686173016643,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Hearts"}}}, - {"timestamp":1686173016644,"username":"Aga","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686173016644,"username":"Aga","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686173016645,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Two","suit":"Spades"}}}, {"timestamp":1686173016645,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Clubs"}}}, {"timestamp":1686173016646,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Diamonds"}}}, {"timestamp":1686173016646,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Spades"}}}, - {"timestamp":1686173016647,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and two is 6"}}, + {"timestamp":1686173016647,"username":"Geoff","action":{"action":"Score","points":6,"reason":"Fifteen two, fifteen four and a pair is 6"}}, {"timestamp":1686173016647,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Three","suit":"Spades"}}}, {"timestamp":1686173016648,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Clubs"}}}, {"timestamp":1686173016649,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Hearts"}}}, {"timestamp":1686173016649,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Nine","suit":"Clubs"}}}, - {"timestamp":1686173016650,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Fifteen two and two is 4"}}, + {"timestamp":1686173016650,"username":"Geoff","action":{"action":"Score","points":4,"reason":"Fifteen two and a pair is 4"}}, {"timestamp":1686173016651,"username":"Aga","action":{"action":"NextToDeal"}}, {"timestamp":1686173016651,"username":"Geoff","action":{"action":"ReceiveCard","card":{"rank":"Queen","suit":"Clubs"}}}, {"timestamp":1686173016652,"username":"Aga","action":{"action":"ReceiveCard","card":{"rank":"Ten","suit":"Hearts"}}}, @@ -2229,12 +2229,12 @@ mod tests { {"timestamp":1686173092404,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Six","suit":"Diamonds"}}}, {"timestamp":1686173092405,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Seven","suit":"Spades"}}}, {"timestamp":1686173092405,"username":"Geoff","action":{"action":"RevealCard","card":{"rank":"Ace","suit":"Hearts"}}}, - {"timestamp":1686173092406,"username":"Geoff","action":{"action":"Score","points":2,"reason":"Two"}}, + {"timestamp":1686173092406,"username":"Geoff","action":{"action":"Score","points":2,"reason":"A pair"}}, {"timestamp":1686173092407,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Diamonds"}}}, {"timestamp":1686173092407,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Five","suit":"Spades"}}}, {"timestamp":1686173092408,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Ten","suit":"Hearts"}}}, {"timestamp":1686173092408,"username":"Aga","action":{"action":"RevealCard","card":{"rank":"Queen","suit":"Spades"}}}, - {"timestamp":1686173092409,"username":"Aga","action":{"action":"Score","points":17,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve and two and three is 17"}}, + {"timestamp":1686173092409,"username":"Aga","action":{"action":"Score","points":17,"reason":"Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve and a pair and a run of three is 17"}}, {"timestamp":1686173092409,"username":"Aga","action":{"action":"WinGame"}} ]"#; diff --git a/src/game/cribbage/score.rs b/src/game/cribbage/score.rs index 9628b4e..98657c8 100644 --- a/src/game/cribbage/score.rs +++ b/src/game/cribbage/score.rs @@ -42,40 +42,40 @@ impl Display for Score { }; let pair_and_run = match (fifteen, pair, run) { (_, 0, 0) => "", - ("", 2, 0) => "Two", - (_, 2, 0) => " and two", - ("", 0, 3) => "Three", - (_, 0, 3) => " and three", - ("", 4, 0) => "Two and two", - (_, 4, 0) => " and two and two", - ("", 0, 4) => "Four", - (_, 0, 4) => " and four", - ("", 2, 3) => "Two and three", - (_, 2, 3) => " and two and three", - ("", 0, 5) => "Five", - (_, 0, 5) => " and five", - ("", 6, 0) => "Six", - (_, 6, 0) => " and six", - ("", 8, 0) => "Six and two", - (_, 8, 0) => " and six and two", - ("", 2, 6) => "Eight", - (_, 2, 6) => " and eight", - ("", 2, 8) => "Ten", - (_, 2, 8) => " and ten", - ("", 12, 0) => "Twelve", - (_, 12, 0) => " and twelve", - ("", 6, 9) => "Fifteen", - (_, 6, 9) => " and fifteen", - ("", 4, 12) => "Sixteen", - (_, 4, 12) => " and sixteen", + ("", 2, 0) => "A pair", + (_, 2, 0) => " and a pair", + ("", 0, 3) => "A run of three", + (_, 0, 3) => " and a run of three", + ("", 4, 0) => "Two pairs", + (_, 4, 0) => " and two pairs", + ("", 0, 4) => "A run of four", + (_, 0, 4) => " and a run of four", + ("", 2, 3) => "A pair and a run of three", + (_, 2, 3) => " and a pair and a run of three", + ("", 0, 5) => "A run of five", + (_, 0, 5) => " and a run of five", + ("", 6, 0) => "Three-of-a-kind for six", + (_, 6, 0) => " and three-of-a-kind for six", + ("", 8, 0) => "Three-of-a-kind for six and a pair", + (_, 8, 0) => " and three-of-a-kind for six and a pair", + ("", 2, 6) => "A double-run for eight", + (_, 2, 6) => " and a double-run for eight", + ("", 2, 8) => "A double-run for ten", + (_, 2, 8) => " and a double-run for ten", + ("", 12, 0) => "Four-of-a-kind for twelve", + (_, 12, 0) => " and four-of-a-kind for twelve", + ("", 6, 9) => "A triple-run for fifteen", + (_, 6, 9) => " and a triple-run for fifteen", + ("", 4, 12) => "A quadruple-run for sixteen", + (_, 4, 12) => " and a quadruple-run for sixteen", _ => return write!(f, "[ERROR] {:?}", self), }; let flush = match (fifteen, pair_and_run, flush) { (_, _, 0) => "", - ("", "", 4) => "Four", - (_, _, 4) => " and four", - ("", "", 5) => "Five", - (_, _, 5) => " and five", + ("", "", 4) => "A flush for four", + (_, _, 4) => " and a flush for four", + ("", "", 5) => "A flush for five", + (_, _, 5) => " and a flush for five", _ => return write!(f, "[ERROR] {:?}", self), }; let nob = match (fifteen, pair_and_run, flush, nob) { @@ -128,43 +128,43 @@ impl Display for PeggingScore { PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 0, go: true } => f.write_str("One for a go"), PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 0, go: false } => f.write_str("Fifteen for two"), PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 0, go: true } => f.write_str("Fifteen for two and a go is three"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 2, run: 0, go: false } => f.write_str("Fifteen two and two is four"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 2, run: 0, go: true } => f.write_str("Fifteen two and two and a go is five"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 3, go: false } => f.write_str("Fifteen two and three is five"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 3, go: true } => f.write_str("Fifteen two and three and a go is six"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 4, go: false } => f.write_str("Fifteen two and four is six"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 4, go: true } => f.write_str("Fifteen two and four and a go is seven"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 5, go: false } => f.write_str("Fifteen two and five is seven"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 5, go: true } => f.write_str("Fifteen two and five and a go is eight"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 6, run: 0, go: false } => f.write_str("Fifteen two and six is eight"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 6, run: 0, go: true } => f.write_str("Fifteen two and six and a go is nine"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 12, run: 0, go: false } => f.write_str("Fifteen two and twelve is fourteen"), - PeggingScore { fifteen: 2, thirty_one: 0, pair: 12, run: 0, go: true } => f.write_str("Fifteen two and twelve and a go is fifteen"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 2, run: 0, go: false } => f.write_str("Fifteen two and a pair is four"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 2, run: 0, go: true } => f.write_str("Fifteen two and a pair and a go is five"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 3, go: false } => f.write_str("Fifteen two and a run of three is five"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 3, go: true } => f.write_str("Fifteen two and a run of three and a go is six"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 4, go: false } => f.write_str("Fifteen two and a run of four is six"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 4, go: true } => f.write_str("Fifteen two and a run of four and a go is seven"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 5, go: false } => f.write_str("Fifteen two and a run of five is seven"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 0, run: 5, go: true } => f.write_str("Fifteen two and a run of five and a go is eight"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 6, run: 0, go: false } => f.write_str("Fifteen two and three-of-a-kind for six is eight"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 6, run: 0, go: true } => f.write_str("Fifteen two and three-of-a-kind for six and a go is nine"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 12, run: 0, go: false } => f.write_str("Fifteen two and four-of-a-kind for six is fourteen"), + PeggingScore { fifteen: 2, thirty_one: 0, pair: 12, run: 0, go: true } => f.write_str("Fifteen two and four-of-a-kind for six and a go is fifteen"), PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 0, go: false } => f.write_str("Thirty-one for two"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 2, run: 0, go: false } => f.write_str("Thirty-one for two and two is four"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 3, go: false } => f.write_str("Thirty-one for two and three is five"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 4, go: false } => f.write_str("Thirty-one for two and four is six"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 5, go: false } => f.write_str("Thirty-one for two and five is seven"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 6, go: false } => f.write_str("Thirty-one for two and six is eight"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 6, run: 0, go: false } => f.write_str("Thirty-one for two and six is eight"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 7, go: false } => f.write_str("Thirty-one for two and seven is nine"), - PeggingScore { fifteen: 0, thirty_one: 2, pair: 12, run: 0, go: false } => f.write_str("Thirty-one for two and twelve is fourteen"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 2, run: 0, go: false } => f.write_str("Two"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 2, run: 0, go: true } => f.write_str("Two and a go is three"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 3, go: false } => f.write_str("Three"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 3, go: true } => f.write_str("Three and a go is four"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 4, go: false } => f.write_str("Four"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 4, go: true } => f.write_str("Four and a go is five"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 5, go: false } => f.write_str("Five"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 5, go: true } => f.write_str("Five and a go is six"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 6, go: false } => f.write_str("Six"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 6, go: true } => f.write_str("Six and a go is seven"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 6, run: 0, go: false } => f.write_str("Six"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 6, run: 0, go: true } => f.write_str("Six and a go is seven"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 7, go: false } => f.write_str("Seven"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 7, go: true } => f.write_str("Seven and a go is eight"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 12, run: 0, go: false } => f.write_str("Twelve"), - PeggingScore { fifteen: 0, thirty_one: 0, pair: 12, run: 0, go: true } => f.write_str("Twelve and a go is thirteen"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 2, run: 0, go: false } => f.write_str("Thirty-one for two and a pair is four"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 3, go: false } => f.write_str("Thirty-one for two and a run of three is five"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 4, go: false } => f.write_str("Thirty-one for two and a run of four is six"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 5, go: false } => f.write_str("Thirty-one for two and a run of five is seven"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 6, go: false } => f.write_str("Thirty-one for two and a run of six is eight"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 6, run: 0, go: false } => f.write_str("Thirty-one for two and three-of-a-kind for six is eight"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 0, run: 7, go: false } => f.write_str("Thirty-one for two and a run of seven is nine"), + PeggingScore { fifteen: 0, thirty_one: 2, pair: 12, run: 0, go: false } => f.write_str("Thirty-one for two and four-of-a-kind for twelve is fourteen"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 2, run: 0, go: false } => f.write_str("A pair"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 2, run: 0, go: true } => f.write_str("A pair and a go is three"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 3, go: false } => f.write_str("A run of three"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 3, go: true } => f.write_str("A run of three and a go is four"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 4, go: false } => f.write_str("A run of four"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 4, go: true } => f.write_str("A run of four and a go is five"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 5, go: false } => f.write_str("A run of five"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 5, go: true } => f.write_str("A run of five and a go is six"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 6, go: false } => f.write_str("A run of six"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 6, go: true } => f.write_str("A run of six and a go is seven"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 6, run: 0, go: false } => f.write_str("Three-of-a-kind for six"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 6, run: 0, go: true } => f.write_str("Three-of-a-kind for six and a go is seven"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 7, go: false } => f.write_str("A run of seven"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 0, run: 7, go: true } => f.write_str("A run of seven and a go is eight"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 12, run: 0, go: false } => f.write_str("Four-of-a-kind for twelve"), + PeggingScore { fifteen: 0, thirty_one: 0, pair: 12, run: 0, go: true } => f.write_str("Four-of-a-kind for twelve and a go is thirteen"), _ => write!(f, "[ERROR] {:?}", self), } } @@ -282,30 +282,30 @@ mod test { fn cribbage_hand_rankings_with_display() { let score = score_4_card_cribbage_hand([ACE_OF_HEARTS, ACE_OF_SPADES, TWO_OF_CLUBS, TWO_OF_DIAMONDS], THREE_OF_HEARTS, false); assert_eq!(16, score.points()); - assert_eq!("Sixteen", format!("{}", score)); + assert_eq!("A quadruple-run for sixteen", format!("{}", score)); let score = score_4_card_cribbage_hand([ACE_OF_HEARTS, ACE_OF_SPADES, SIX_OF_SPADES, SEVEN_OF_CLUBS], SEVEN_OF_DIAMONDS, false); assert_eq!(12, score.points()); - assert_eq!("Fifteen two, fifteen four, fifteen six, fifteen eight and two and two is 12", format!("{}", score)); + assert_eq!("Fifteen two, fifteen four, fifteen six, fifteen eight and two pairs is 12", format!("{}", score)); let score = score_4_card_cribbage_hand([ACE_OF_HEARTS, SEVEN_OF_SPADES, SEVEN_OF_CLUBS, SEVEN_OF_HEARTS], SEVEN_OF_DIAMONDS, false); assert_eq!(24, score.points()); - assert_eq!("Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve and twelve is 24", format!("{}", score)); + assert_eq!("Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve and four-of-a-kind for twelve is 24", format!("{}", score)); let score = score_4_card_cribbage_hand([FIVE_OF_CLUBS, FIVE_OF_DIAMONDS, FIVE_OF_HEARTS, JACK_OF_SPADES], TEN_OF_SPADES, false); assert_eq!(21, score.points()); assert_eq!( - "Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve, fifteen fourteen and six and one for his nob is 21", + "Fifteen two, fifteen four, fifteen six, fifteen eight, fifteen ten, fifteen twelve, fifteen fourteen and three-of-a-kind for six and one for his nob is 21", format!("{}", score) ); let score = score_4_card_cribbage_hand([SIX_OF_CLUBS, SEVEN_OF_DIAMONDS, EIGHT_OF_HEARTS, NINE_OF_SPADES], NINE_OF_CLUBS, false); assert_eq!(16, score.points()); - assert_eq!("Fifteen two, fifteen four, fifteen six and ten is 16", format!("{}", score)); + assert_eq!("Fifteen two, fifteen four, fifteen six and a double-run for ten is 16", format!("{}", score)); let score = score_4_card_cribbage_hand([NINE_OF_CLUBS, TEN_OF_DIAMONDS, JACK_OF_HEARTS, QUEEN_OF_SPADES], KING_OF_CLUBS, false); assert_eq!(5, score.points()); - assert_eq!("Five", format!("{}", score)); + assert_eq!("A run of five", format!("{}", score)); } #[test] @@ -367,7 +367,7 @@ mod test { fn pegging_scores() { let score = score_pegging(&[ACE_OF_SPADES, TWO_OF_SPADES, THREE_OF_SPADES, FOUR_OF_SPADES, FIVE_OF_SPADES], false); assert_eq!(7, score.points()); - assert_eq!("Fifteen two and five is seven", format!("{}", score)); + assert_eq!("Fifteen two and a run of five is seven", format!("{}", score)); let score = score_pegging(&[TEN_OF_HEARTS, FIVE_OF_CLUBS], false); assert_eq!(2, score.points()); @@ -386,6 +386,6 @@ mod test { fn pegging_pair_with_a_go() { let score = score_pegging(&[TEN_OF_DIAMONDS, THREE_OF_DIAMONDS, THREE_OF_HEARTS], true); assert_eq!(3, score.points()); - assert_eq!("Two and a go is three", format!("{}", score)); + assert_eq!("A pair and a go is three", format!("{}", score)); } } -- 2.34.1