aboutsummaryrefslogtreecommitdiff
path: root/src/game.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.rs')
-rw-r--r--src/game.rs31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/game.rs b/src/game.rs
index 7e96a2e..c0a25b8 100644
--- a/src/game.rs
+++ b/src/game.rs
@@ -1,19 +1,19 @@
/*
- This file is part of Takwrap.
+This file is part of Takwrap.
- Takwrap is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+Takwrap is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
- Takwrap is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+Takwrap is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with Takwrap. If not, see <https://www.gnu.org/licenses/>.
-*/
+You should have received a copy of the GNU General Public License
+along with Takwrap. If not, see <https://www.gnu.org/licenses/>.
+ */
use std::collections::HashSet;
use std::fmt;
@@ -157,9 +157,9 @@ pub type Stack = Vec<Piece>;
/*
const-generics would solve a lot of my consistency problems here,
- GameState<const size : u8> {
- ...
- board: [Stack; size],
+GameState<const size : u8> {
+...
+board: [Stack; size],
}
but at the time of writing this is not yet part of the language.
@@ -375,6 +375,7 @@ impl GameState {
- Top stone belongs to player
- One or more on each subsequent square
- Total number of stones picked up does not exceed the carry capacity
+ - Enough stones on on square
- Direction does not contain a capstone
- Wall may only appear on last spot if it's capstone alone that covers
- All stones are used up before then end of the board is met