Fix: indent await send(full, peer) inside STATE_FULL if block to resolve SyntaxError

This commit is contained in:
Vladyslav Doloman
2025-10-08 01:05:47 +03:00
parent 56ac74e916
commit c4a8501635

View File

@@ -1,4 +1,4 @@
from __future__ import annotations
from __future__ import annotations
import asyncio
from dataclasses import dataclass
@@ -136,7 +136,7 @@ class GameServer:
# --- Simulation ---
def _consume_input_for_snake(self, s: Snake) -> None:
# Consume at most one input; skip 180° turns when length>1
# Consume at most one input; skip 180° turns when length>1
while s.input_buf:
nd = s.input_buf[0]
# 180-degree check
@@ -507,7 +507,7 @@ class GameServer:
dir_capacity_bytes = max(0, budget - overhead)
if dir_capacity_bytes <= 0:
break
# Convert capacity bytes to number of directions (each 2 bits 4 dirs per byte)
# Convert capacity bytes to number of directions (each 2 bits → 4 dirs per byte)
dir_capacity = dir_capacity_bytes * 4
if dir_capacity <= 0:
break