Skip to main content

Order

Trait Order 

Source
pub trait Order<R: Sides> {
    // Required method
    fn order(&mut self, rules: &R, commands: Vec<R::Command>) -> Vec<R::Command>;
}
Expand description

The game’s list of candidates, from the real state’s legal_commands: it may drop commands (ones the game never wants tried) and puts the most promising first. It returns only commands from the list it is given.

Required Methods§

Source

fn order(&mut self, rules: &R, commands: Vec<R::Command>) -> Vec<R::Command>

commands (the legal commands of rules), dropped and reordered.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R, H> Order<R> for TacticsOrder<H>
where R: Sides, R::Command: PartialEq, H: OrderHooks<R>,

Source§

impl<R: Sides, F: FnMut(&R, Vec<R::Command>) -> Vec<R::Command>> Order<R> for F

Source§

impl<R: Sides> Order<R> for Unordered