/*
Hurry Curry! - a game about cooking
Copyright (C) 2025 Hurry Curry! Contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License only.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
#![feature(let_chains)]
pub mod network;
pub mod spatial_index;
use hurrycurry_protocol::{
glam::IVec2, movement::MovementBase, Character, Gamedata, Hand, ItemIndex, ItemLocation,
Message, MessageTimeout, PacketC, PlayerClass, PlayerID, RecipeIndex, Score, TileIndex,
};
use spatial_index::SpatialIndex;
use std::{
collections::{HashMap, HashSet},
sync::Arc,
time::Instant,
};
#[derive(Debug, PartialEq)]
pub struct Involvement {
pub position: f32,
pub speed: f32,
pub recipe: RecipeIndex,
pub player: Option,
pub warn: bool,
}
#[derive(Debug, PartialEq)]
pub struct Item {
pub kind: ItemIndex,
pub active: Option,
}
pub struct Tile {
pub kind: TileIndex,
pub item: Option,
}
pub struct Player {
pub name: String,
pub class: PlayerClass,
pub character: Character,
pub interacting: Option<(IVec2, Hand)>,
pub items: Vec