MCPcopy Create free account
hub / github.com/atas76/openengine / getActionContext

Method getActionContext

src/main/java/org/ttn/parser/ParserUtil.java:62–82  ·  view source on GitHub ↗
(String actionContextValue)

Source from the content-addressed store, hash-verified

60 }
61
62 public static ActionContext getActionContext(String actionContextValue) throws ValueException {
63 return switch(actionContextValue) {
64 case "Fr" -> FREE_SPACE;
65 case "I" -> INTERCEPTION;
66 case "HD" -> HEADER;
67 case "Cnt" -> CONTROL;
68 case "Mrk" -> MARKED;
69 case "Pvt" -> PIVOT;
70 case "Clr" -> CLEARANCE;
71 case "Pr" -> PRESSED;
72 case "Tck" -> TACKLING;
73 case "SP" -> SET_PIECE;
74 case "Ch" -> CHALLENGE;
75 case "B" -> BLOCK;
76 case "FT" -> FIRST_TOUCH;
77 case "Hld" -> HOLD;
78 case "Adv" -> ADVANTAGE;
79 case "Dv" -> DIVE;
80 default -> throw new ValueException("Could not map action context value");
81 };
82 }
83
84 public static ActionOutcomeType getActionOutcomeType(String actionOutcomeValue) throws ValueException {
85 return switch (actionOutcomeValue) {

Callers 4

parseActionOutcomeMethod · 0.95
parseStatementMethod · 0.95

Calls

no outgoing calls

Tested by 1