fix terrain passing
This commit is contained in:
parent
4692ffa259
commit
01cf81f930
8
calc.js
8
calc.js
@ -121,7 +121,7 @@ function* iterate(arr) {
|
|||||||
function unwrapToken(type, token) {
|
function unwrapToken(type, token) {
|
||||||
assert(
|
assert(
|
||||||
token.tokenType.name == type,
|
token.tokenType.name == type,
|
||||||
`expected token ${type}, got ${token.tokenType.name}`,
|
`expected token ${type}, got ${token.tokenType.name}`
|
||||||
);
|
);
|
||||||
return token.image;
|
return token.image;
|
||||||
}
|
}
|
||||||
@ -237,13 +237,11 @@ function parseAndCalculate(line) {
|
|||||||
field.weather = next.image;
|
field.weather = next.image;
|
||||||
break;
|
break;
|
||||||
case "Terrain":
|
case "Terrain":
|
||||||
field.terrain = next.image;
|
field.terrain = next.image.replace(" Terrain", "");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw Error(
|
throw Error(
|
||||||
"Unhandled terrain %s: %s",
|
`Unhandled field condition ${next.tokenType.name}: ${next.image}`
|
||||||
next.tokenType.name,
|
|
||||||
next.image
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user