diff --git a/src/Mono.cs b/src/Mono.cs index 37ad4cf..9d31865 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -127,14 +127,8 @@ static class Mono return; } - XYZi next_pos = snake[0] + snake_dir; - XYZi inset_pos = new( - next_pos.x - Maths.sign(next_pos.x), - next_pos.y - Maths.sign(next_pos.y), - next_pos.z - Maths.sign(next_pos.z) - ); - bool around_box = s_array.InRange(inset_pos); - if (!around_box) + bool in_or_around_box = s_array.InRange(snake[0] + snake_dir); + if (!in_or_around_box) { return; }