Skip to content

Commit

Permalink
personal review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Sep 28, 2024
1 parent ace3716 commit 52e9d45
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

public final class HexAreaDeserializer {

// Possible future improvements:
// read board-relative sizes, like mindistance = 50%W for half board width
// read rectangle as UL corner and W/H

private static final String UNION = "union";
private static final String DIFFERENCE = "difference";
private static final String INTERSECTION = "intersection";
Expand Down Expand Up @@ -64,6 +68,12 @@ public final class HexAreaDeserializer {
private static final String MIN_LEVEL = "minlevel";
private static final String MAX_LEVEL = "maxlevel";

/**
* Parses a HexArea from the given YAML node. The node should be below the "area:" level.
*
* @param node The node to parse
* @return A HexArea parsed from the given node
*/
public static HexArea parseShape(JsonNode node) {
if (node.has(UNION)) {
return parseUnion(node.get(UNION));
Expand Down

0 comments on commit 52e9d45

Please sign in to comment.