aboutsummaryrefslogtreecommitdiff
path: root/src/game.rs
diff options
context:
space:
mode:
authortslil clingman <>2020-11-10 22:30:08 -0500
committertslil clingman <>2020-11-10 23:22:51 -0500
commit0b1ba27037bd116087cb1bdcfe81d850b20eab97 (patch)
treec3d6dcd96b27e2933c0cddf2d9cd2ccaea59ceef /src/game.rs
parent9d8ef22f2c5645d6911f2677e877569874ccda38 (diff)
Refactoring
Diffstat (limited to 'src/game.rs')
-rw-r--r--src/game.rs13
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,