Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #139: Made Tree Tent use TreeTentType #464

Merged
merged 5 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changes to TreeTent.
  • Loading branch information
pitbull51067 committed Feb 17, 2023
commit ef612a2979cbebe046c611a54751c013bd004812
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 38,7 @@ public PuzzleElement importCell(Node node, Board board) throws InvalidFileFormat
throw new InvalidFileFormatException("TreeTent Factory: cell unknown value");
}

TreeTentCell cell = new TreeTentCell(TreeTentType.convertToTreeTentType(value), new Point(x, y));
TreeTentCell cell = new TreeTentCell(TreeTentType.valueOf(value), new Point(x, y));
cell.setIndex(y * height x);
return cell;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,7 @@ public enum TreeTentType {
UNKNOWN, TREE, GRASS, TENT,
CLUE_NORTH, CLUE_EAST, CLUE_SOUTH, CLUE_WEST;

public static TreeTentType convertToTreeTentType(int num) {
public static TreeTentType valueOf(int num) {
switch (num) {
case 1:
return TREE;
Expand Down