five-on-it / packages/shared/src/area
packages/shared/src/area
Areas of the ground (m, the game's frame): a circle, or a polygon of points with the circle round it (its vertices' mean and the farthest of them). A game's zones are areas (a place and a radius, or a polygon: @foi/missions), and so are the simulation's safe zones and the AI's restricted zones; the tests here are what each of them asks. Plain arithmetic, deterministic: the simulation and the mission interpreter run them on the server and the client alike.