use crate::dynamic_data::choices::TurnChoice; use crate::dynamic_data::models::pokemon::Pokemon; use parking_lot::RwLock; use std::sync::Arc; #[derive(Debug)] pub struct ChoiceQueue<'battle, 'library> { queue: Vec>>>, current: usize, } impl<'battle, 'library> ChoiceQueue<'battle, 'library> { pub fn new(queue: Vec>>>) -> Self { Self { queue, current: 0 } } pub fn dequeue<'b>(&'b mut self) -> &'b Arc>> { let c = &self.queue[self.current]; self.current += 1; c } pub fn peek(&mut self) -> &'battle Arc> { &self.queue[self.current] } pub fn has_next(&self) -> bool { self.current < self.queue.len() } pub fn move_pokemon_choice_next(&mut self, _pokemon: &Pokemon) { todo!() } pub(crate) fn get_queue(&self) -> &Vec>>> { &self.queue } }