You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that isSomethingInFront() can return true when that "something" is a wall, and not a unit. In that case, getUnit() will return undefined, and anything you call on it will return an error (e.g. Cannot read property 'isEnemy' of undefined).
You can update the definition of isEnemyInFront to check isSomethingInFront && !isWallInFront.
Environment
Steps to reproduce
On website
Baby Steps - Level 6
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: