Fix: indent await send(full, peer) inside STATE_FULL if block to resolve SyntaxError
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
@@ -136,7 +136,7 @@ class GameServer:
|
|||||||
# --- Simulation ---
|
# --- Simulation ---
|
||||||
|
|
||||||
def _consume_input_for_snake(self, s: Snake) -> None:
|
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:
|
while s.input_buf:
|
||||||
nd = s.input_buf[0]
|
nd = s.input_buf[0]
|
||||||
# 180-degree check
|
# 180-degree check
|
||||||
@@ -507,7 +507,7 @@ class GameServer:
|
|||||||
dir_capacity_bytes = max(0, budget - overhead)
|
dir_capacity_bytes = max(0, budget - overhead)
|
||||||
if dir_capacity_bytes <= 0:
|
if dir_capacity_bytes <= 0:
|
||||||
break
|
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
|
dir_capacity = dir_capacity_bytes * 4
|
||||||
if dir_capacity <= 0:
|
if dir_capacity <= 0:
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user