From 545cb5dce39da83de27b04089e7fd4d91eef4592 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 17 Jan 2023 21:16:29 +0100 Subject: [PATCH] docs --- minmax-rs/src/state.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/minmax-rs/src/state.rs b/minmax-rs/src/state.rs index 0c6a1b7..9377865 100644 --- a/minmax-rs/src/state.rs +++ b/minmax-rs/src/state.rs @@ -1,3 +1,5 @@ +//! All of the overengineered code around Players and Scores. + use std::{ fmt::{Debug, Display}, marker::PhantomData, @@ -100,6 +102,7 @@ impl Try for State { // This fun generic setup ensures that we never compare two scores from different layers. pub struct Score

(pub i32, PhantomData

); +// your brain on types. this is really bad. but really funny. and it works. pub trait MinmaxPlayer { type Enemy: MinmaxPlayer; }