2 Commits

Author SHA1 Message Date
Quaternions 156bc8f9b2 card_game without Session is no_std 2026-05-29 17:14:57 -07:00
Quaternions f2f9085aaf use exhaustive match 2026-05-29 17:08:57 -07:00
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -317,12 +317,12 @@ pub enum SolveError {
MovesBudgetExceeded,
StatesBudgetExceeded,
}
impl std::fmt::Display for SolveError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl core::fmt::Display for SolveError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{self:?}")
}
}
impl std::error::Error for SolveError {}
impl core::error::Error for SolveError {}
/// The solution tends to be very large with long chains of moves that go back to the same state.
/// It is recommended to call .clean_solution() if the solution is actually going to be shown to a user.
+1 -1
View File
@@ -776,7 +776,7 @@ impl Game for Klondike {
match src {
KlondikePileStack::Stock => stats.increment_move_to_tableau(),
KlondikePileStack::Foundation(_) => stats.increment_move_from_foundation(),
_ => {}
KlondikePileStack::Tableau(_) => {}
}
let (cards, did_flip_up) = self.state.take_stack_flip_up(src);
if did_flip_up {