1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
use crateHandedness;
use crateDirection;
use cratePose;
/// Gull behaviour state (spec §3.5). Walking is the default and the whole
/// offensive layer: a walking gull is steerable with signposts. Flight is a
/// brief, occasional hop that exists so no corner can be permanently safe.
/// One gull. Moves on the grid exactly like a crab while walking (walls,
/// signposts, handedness), slower than a common crab.
/// A gull on its way in from beyond the beach: the edge spawner has picked
/// the tile it lands on, `tile`, and it lands there facing `dir` on tick
/// `at`, a [`GULL_LEAD`] after the pick.
///
/// Part of the board's state, hashed and written into every snapshot, and
/// public: the bird is in the sky over the sand, so every player sees
/// where it will come down, and a bot is told as much as they are.
/// Ticks between the edge spawner picking a gull's landing tile and the
/// gull landing on it: the 1.2 s the render layer flies it in over, its
/// shadow reaching the sand ahead of it. A warning a player can act on is
/// one that comes before the bird, not with it.
pub const GULL_LEAD: u32 = 36;
/// Walking speed in subunits per tick (spec §4.2: slower than a common crab).
pub const GULL_WALK_SPEED: u16 = 8;
/// Flying speed in subunits per tick.
pub const GULL_FLY_SPEED: u16 = 16;
/// Gull-eats-crab range: Manhattan distance between sub-tile offsets on the
/// same tile, in subunits (spec §4.3 suggests 48).
pub const EAT_RANGE: u16 = 48;
/// Takeoff timer range in ticks (5–12 s at 30 Hz): keeps gulls walking, and
/// therefore steerable, roughly 85% of the time (spec §3.5).
pub const TAKEOFF_MIN: u32 = 150;
pub const TAKEOFF_MAX: u32 = 360;
/// Flight length range in tiles (spec §3.5: 2–4).
pub const FLIGHT_MIN: u8 = 2;
pub const FLIGHT_MAX: u8 = 4;