A lot more work on a bunch of different parts of the system.

This commit is contained in:
2022-06-11 17:22:46 +02:00
parent 10e93949e4
commit 6e8f4dd4a5
35 changed files with 735 additions and 197 deletions

View File

@@ -1,2 +1,32 @@
use crate::dynamic_data::models::pokemon::Pokemon;
use std::sync::Arc;
#[derive(Debug)]
pub struct ChoiceQueue {}
pub struct ChoiceQueue {
queue: Vec<Arc<ChoiceQueue>>,
current: usize,
}
impl ChoiceQueue {
pub fn new(queue: Vec<Arc<ChoiceQueue>>) -> Self {
Self { queue, current: 0 }
}
pub fn dequeue(&mut self) -> &Arc<ChoiceQueue> {
let c = &self.queue[self.current];
self.current += 1;
c
}
pub fn peek(&mut self) -> &Arc<ChoiceQueue> {
&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!()
}
}