Skip to content

Commit

Permalink
Merge pull request #391 from Bram-Hub/new_puzzle-skyscrapers
Browse files Browse the repository at this point in the history
New puzzle skyscrapers

Merging
  • Loading branch information
Chase-Grajeda authored Dec 9, 2022
2 parents b7fce6d + bc6c005 commit 715ee13
Show file tree
Hide file tree
Showing 58 changed files with 1,389 additions and 805 deletions.
30 changes: 0 additions & 30 deletions puzzles files/skyscrapers/1646651

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board height="4" width="4">
<board size="4">
<cells>

</cells>
<axis side="east">
<clue index="1" value="3"/>
<clue index="2" value="3"/>
<clue index="4" value="1"/>
<clue index="2" value="2"/>
<clue index="3" value="1"/>
<clue index="2" value="2"/>
</axis>
<axis side="south">
<clue index="1" value="3"/>
<clue index="2" value="3"/>
<clue index="4" value="1"/>
<clue index="2" value="3"/>
<clue index="2" value="2"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>
23 changes: 23 additions & 0 deletions puzzles files/skyscrapers/4x4 Skyscrapers Easy2
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="4">
<cells>

</cells>
<axis side="east">
<clue index="2" value="3"/>
<clue index="2" value="2"/>
<clue index="1" value="3"/>
<clue index="4" value="1"/>
</axis>
<axis side="south">
<clue index="2" value="2"/>
<clue index="1" value="3"/>
<clue index="2" value="2"/>
<clue index="3" value="1"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>
23 changes: 23 additions & 0 deletions puzzles files/skyscrapers/4x4 Skyscrapers Easy3
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="4">
<cells>

</cells>
<axis side="east">
<clue index="2" value="2"/>
<clue index="1" value="4"/>
<clue index="2" value="1"/>
<clue index="2" value="3"/>
</axis>
<axis side="south">
<clue index="2" value="3"/>
<clue index="3" value="1"/>
<clue index="1" value="2"/>
<clue index="2" value="2"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>
26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Easy1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="3" value="2"/>
<clue index="1" value="3"/>
<clue index="2" value="2"/>
<clue index="2" value="4"/>
<clue index="3" value="1"/>
</axis>
<axis side="south">
<clue index="2" value="3"/>
<clue index="2" value="2"/>
<clue index="2" value="2"/>
<clue index="1" value="5"/>
<clue index="3" value="1"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Easy2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="2" value="2"/>
<clue index="1" value="2"/>
<clue index="2" value="4"/>
<clue index="4" value="1"/>
<clue index="3" value="2"/>
</axis>
<axis side="south">
<clue index="2" value="4"/>
<clue index="2" value="2"/>
<clue index="1" value="4"/>
<clue index="4" value="1"/>
<clue index="3" value="2"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Easy3
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="5" value="1"/>
<clue index="2" value="2"/>
<clue index="1" value="2"/>
<clue index="2" value="4"/>
<clue index="3" value="2"/>
</axis>
<axis side="south">
<clue index="3" value="2"/>
<clue index="3" value="2"/>
<clue index="2" value="3"/>
<clue index="2" value="1"/>
<clue index="1" value="3"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Medium1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="4" value="1"/>
<clue index="1" value="3"/>
<clue index="3" value="2"/>
<clue index="2" value="2"/>
<clue index="3" value="2"/>
</axis>
<axis side="south">
<clue index="2" value="3"/>
<clue index="2" value="2"/>
<clue index="2" value="2"/>
<clue index="3" value="1"/>
<clue index="1" value="4"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Medium2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="3" value="2"/>
<clue index="4" value="2"/>
<clue index="2" value="3"/>
<clue index="2" value="1"/>
<clue index="1" value="2"/>
</axis>
<axis side="south">
<clue index="3" value="1"/>
<clue index="2" value="3"/>
<clue index="1" value="3"/>
<clue index="2" value="4"/>
<clue index="3" value="2"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

26 changes: 26 additions & 0 deletions puzzles files/skyscrapers/5x5 Skyscrapers Medium3
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Legup version="2.0.0">
<puzzle name="Skyscrapers">
<board size="5">
<cells>

</cells>
<axis side="east">
<clue index="1" value="4"/>
<clue index="4" value="1"/>
<clue index="2" value="2"/>
<clue index="2" value="2"/>
<clue index="3" value="2"/>
</axis>
<axis side="south">
<clue index="1" value="3"/>
<clue index="2" value="2"/>
<clue index="2" value="3"/>
<clue index="3" value="1"/>
<clue index="2" value="3"/>
</axis>
<flags dupe="true" view="false"/>
</board>
</puzzle>
</Legup>

46 changes: 0 additions & 46 deletions puzzles files/skyscrapers/easy1.xml

This file was deleted.

4 changes: 4 additions & 0 deletions src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public String getErrorString() {
return "The selected data element is not pickable with this case rule.";
}

if(caseRule.getCases(caseBoard.getBaseBoard(), elementView.getPuzzleElement()).size() == 0){
return "The selection must produce at least one case";
}

return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import edu.rpi.legup.model.gameboard.Board;
import edu.rpi.legup.model.gameboard.PuzzleElement;
import edu.rpi.legup.model.rules.ContradictionRule;
import edu.rpi.legup.puzzle.lightup.LightUpBoard;
import edu.rpi.legup.puzzle.lightup.LightUpCell;
import edu.rpi.legup.puzzle.lightup.LightUpCellType;

public class Skyscrapers extends Puzzle {

Expand All @@ -26,7 +23,6 @@ public Skyscrapers() {
*/
@Override
public void initializeView() {
SkyscrapersBoard board = (SkyscrapersBoard) currentBoard;
boardView = new SkyscrapersView((SkyscrapersBoard) currentBoard);
}

Expand Down
Loading

0 comments on commit 715ee13

Please sign in to comment.