From 0b1ba27037bd116087cb1bdcfe81d850b20eab97 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Tue, 10 Nov 2020 22:30:08 -0500 Subject: Refactoring --- src/game.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game.rs') diff --git a/src/game.rs b/src/game.rs index 4a91755..e86cf58 100644 --- a/src/game.rs +++ b/src/game.rs @@ -154,6 +154,19 @@ impl fmt::Display for WinType { pub type Stack = Vec; +/* +const-generics would solve a lot of my consistency problems here, + + GameState { + ... + board: [Stack; size], + } + +but at the time of writing this is not yet part of the language. +Perhaps one day we'll have a systems programming language with a nice +dependent type system ;) +*/ + struct GameState { size: u8, black_flats: u8, -- cgit v1.3.1