summary refs log tree commit diff stats
path: root/Source/Validator.cpp
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-20 10:05:59 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-20 10:05:59 -0800
commit6f0a34bfb761d965bd961dc1f880b84e35f9959f (patch)
tree9fad4b4d98f5cb644b635c017a959dd3752a0399 /Source/Validator.cpp
parentab5652329d3e6bbaaf338e47fb3d84d89bf9b7b1 (diff)
downloadwitness-tutorializer-6f0a34bfb761d965bd961dc1f880b84e35f9959f.tar.gz
witness-tutorializer-6f0a34bfb761d965bd961dc1f880b84e35f9959f.tar.bz2
witness-tutorializer-6f0a34bfb761d965bd961dc1f880b84e35f9959f.zip
Understanding symmetry, but nothing else.
Diffstat (limited to 'Source/Validator.cpp')
-rw-r--r--Source/Validator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Validator.cpp b/Source/Validator.cpp index 82d6779..e71dc34 100644 --- a/Source/Validator.cpp +++ b/Source/Validator.cpp
@@ -32,7 +32,7 @@ void Validator::Validate(Puzzle& p) {
32 if (p.GetLine(x, y + 1) != Cell::Color::NONE) actualCount++; 32 if (p.GetLine(x, y + 1) != Cell::Color::NONE) actualCount++;
33 if (decoration->count != actualCount) { 33 if (decoration->count != actualCount) {
34 // console.log('Triangle at grid['+x+']['+y+'] has', actualCount, 'borders') 34 // console.log('Triangle at grid['+x+']['+y+'] has', actualCount, 'borders')
35 p.invalidElements.emplace_back(Pos{x, y}); 35 p.invalidElements.emplace_back(x, y);
36 } 36 }
37 } 37 }
38 } 38 }
@@ -43,7 +43,7 @@ void Validator::Validate(Puzzle& p) {
43 if (cell.dot != Cell::Dot::NONE) { 43 if (cell.dot != Cell::Dot::NONE) {
44 if (cell.color == Cell::Color::NONE) { 44 if (cell.color == Cell::Color::NONE) {
45 // console.log('Dot at', x, y, 'is not covered') 45 // console.log('Dot at', x, y, 'is not covered')
46 p.invalidElements.emplace_back(Pos{x, y}); 46 p.invalidElements.emplace_back(x, y);
47 } else if (cell.color == Cell::Color::BLUE && cell.dot == Cell::Dot::YELLOW) { 47 } else if (cell.color == Cell::Color::BLUE && cell.dot == Cell::Dot::YELLOW) {
48 // console.log('Yellow dot at', x, y, 'is covered by blue line') 48 // console.log('Yellow dot at', x, y, 'is covered by blue line')
49 p.valid = false; 49 p.valid = false;