diff options
Diffstat (limited to 'src/game.rs')
| -rw-r--r-- | src/game.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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<Piece>; +/* +const-generics would solve a lot of my consistency problems here, + + GameState<const size : u8> { + ... + 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, |
