Rewrite to a API trait.

This commit is contained in:
2026-01-11 14:12:54 +01:00
parent ea9f05b048
commit 88f8cf76ef
45 changed files with 1384 additions and 1030 deletions

View File

@@ -1,15 +1,16 @@
use std::{collections::HashMap, fmt::Display};
use crate::domain::game::Game;
use crate::domain::location::Location;
#[derive(Clone)]
pub struct OwnedGames(pub HashMap<String, Vec<Game>>);
pub struct OwnedGames (pub HashMap<String, Vec<(Game, Option<Location>)>>);
impl Display for OwnedGames {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
for (k,v) in &self.0 {
write!(f, "{k}:\n")?;
for g in v {
for (g, _) in v {
write!(f, "\t{}\n", g.name)?;
}
}