mirror of
https://github.com/Noratrieb/minmax.git
synced 2026-01-14 15:25:08 +01:00
docs
This commit is contained in:
parent
8a87691e10
commit
545cb5dce3
1 changed files with 3 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! All of the overengineered code around Players and Scores.
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt::{Debug, Display},
|
fmt::{Debug, Display},
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
|
|
@ -100,6 +102,7 @@ impl Try for State {
|
||||||
// This fun generic setup ensures that we never compare two scores from different layers.
|
// This fun generic setup ensures that we never compare two scores from different layers.
|
||||||
pub struct Score<P>(pub i32, PhantomData<P>);
|
pub struct Score<P>(pub i32, PhantomData<P>);
|
||||||
|
|
||||||
|
// your brain on types. this is really bad. but really funny. and it works.
|
||||||
pub trait MinmaxPlayer {
|
pub trait MinmaxPlayer {
|
||||||
type Enemy: MinmaxPlayer<Enemy = Self>;
|
type Enemy: MinmaxPlayer<Enemy = Self>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue