From 5f883c80e7fc63c97910d003c44aea814ab8a5d6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 18 Jul 2024 15:42:11 +0200 Subject: reimplement customers as entity --- server/src/bin/graph.rs | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'server/src/bin/graph.rs') diff --git a/server/src/bin/graph.rs b/server/src/bin/graph.rs index 49ad4716..58cc1763 100644 --- a/server/src/bin/graph.rs +++ b/server/src/bin/graph.rs @@ -17,10 +17,7 @@ */ use anyhow::{anyhow, Result}; use hurrycurry_protocol::{ItemIndex, RecipeIndex}; -use hurrycurry_server::{ - data::{DataIndex, Demand}, - interaction::Recipe, -}; +use hurrycurry_server::{data::DataIndex, interaction::Recipe}; #[tokio::main] async fn main() -> Result<()> { @@ -60,25 +57,26 @@ async fn main() -> Result<()> { } } - for ( - di, - Demand { - duration, - from: ItemIndex(from), - to, - points, - }, - ) in data.demands.iter().enumerate() - { - let color = "#c4422b"; - println!( - "d{di} [label=\"Demand\\ntakes {duration}s\\n{points} points\" shape=box color={color:?} fillcolor={color:?} style=filled]", - ); - println!("i{from} -> d{di}"); - if let Some(ItemIndex(to)) = to { - println!("d{di} -> i{to}"); - } - } + // TODO + // for ( + // di, + // Demand { + // duration, + // from: ItemIndex(from), + // to, + // points, + // }, + // ) in data.demands.iter().enumerate() + // { + // let color = "#c4422b"; + // println!( + // "d{di} [label=\"Demand\\ntakes {duration}s\\n{points} points\" shape=box color={color:?} fillcolor={color:?} style=filled]", + // ); + // println!("i{from} -> d{di}"); + // if let Some(ItemIndex(to)) = to { + // println!("d{di} -> i{to}"); + // } + // } println!("}}"); Ok(()) -- cgit v1.2.3-70-g09d2