[fine] Parse is expression, partially
This commit is contained in:
parent
afa4812074
commit
ba5b37f5ff
4 changed files with 98 additions and 23 deletions
|
|
@ -33,7 +33,7 @@ class Monster {
|
|||
fun print(x:string) {}
|
||||
|
||||
fun in_range(weapon: MeleeWeapon or RangedWeapon, distance: f64) {
|
||||
weapon match {
|
||||
match weapon {
|
||||
w:RangedWeapon -> distance >= w.minRange and distance <= w.maxRange,
|
||||
_ -> distance == 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue