Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNisnevich committed Feb 3, 2025
1 parent dd54cb3 commit eb1d7fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/scala/wordbots/Lexicon.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ object Lexicon {
(NP/NP, λ {c: TilesMatchingConditions => TilesMatchingConditions(Seq(AdjacentTo(ThisObject)) ++ c.conditions)})
)) +
("adjacent tile" -> (NP, TilesMatchingConditions(Seq(AdjacentTo(They))): Sem)) + // e.g. "Move each robot to a random adjacent tile."
("adjacent to" -> Seq(
(PP/NP, λ {t: TargetObjectOrTile => AdjacentTo(t)}),
(PP/NP, λ {t: TargetObject => ChooseT(TilesMatchingConditions(Seq(AdjacentTo(t))))}),
((NP/NP)\N, λ {o: ObjectType => λ {t: TargetObjectOrTile => ObjectsMatchingConditions(o, Seq(AdjacentTo(t)))}}),
(PP/NP, λ {c: ObjectsMatchingConditions => ObjectsMatchingConditions(c.objectType, Seq(AdjacentTo(ThisObject)) ++ c.conditions)})
)) +
("is" / Seq("adjacent to", "adjacent to a", "adjacent to an") -> Seq(
((S\NP)/N, λ {t: ObjectType => λ {o: TargetObject => CollectionExists(ObjectsMatchingConditions(t, Seq(AdjacentTo(o))))}}),
((S\N)/NP, λ {o: TargetObject => λ {e: EnemyObject => CollectionExists(ObjectsMatchingConditions(e.objectType, Seq(AdjacentTo(o), ControlledBy(Opponent))))}}),
Expand All @@ -75,12 +81,6 @@ object Lexicon {
((S\N)/NP, λ {o: TargetObject => λ {e: EnemyObject => NotGC(CollectionExists(ObjectsMatchingConditions(e.objectType, Seq(AdjacentTo(o), ControlledBy(Opponent)))))}}),
((S\NP)/NP, λ {c: ObjectsMatchingConditions => λ {o: TargetObject => NotGC(CollectionExists(ObjectsMatchingConditions(c.objectType, c.conditions :+ AdjacentTo(o))))}})
)) +
("adjacent to" -> Seq(
(PP/NP, λ {t: TargetObjectOrTile => AdjacentTo(t)}),
(PP/NP, λ {t: TargetObject => ChooseT(TilesMatchingConditions(Seq(AdjacentTo(t))))}),
((NP/NP)\N, λ {o: ObjectType => λ {t: TargetObjectOrTile => ObjectsMatchingConditions(o, Seq(AdjacentTo(t)))}}),
(PP/NP, λ {c: ObjectsMatchingConditions => ObjectsMatchingConditions(c.objectType, Seq(AdjacentTo(ThisObject)) ++ c.conditions)})
)) +
("after attacking" -> (S\S, λ {a: Action => TriggeredAbility(AfterAttack(ThisObject, AllObjects), a)})) +
(Seq("all", "each", "every") -> Seq( // Also see Seq("each", "every") below for definitions that DON'T apply to "all".
(NP/N, λ {o: ObjectType => ObjectsInPlay(o)}),
Expand Down

0 comments on commit eb1d7fc

Please sign in to comment.