Skip to content

Commit c94b859

Browse files
committed
Move Bridge game server to separate CodeClash-ai/Bridge repo
- Update Dockerfile to clone from https://github.com/CodeClash-ai/Bridge - Remove game_server/ and examples/ (now in separate repo) - Update bridge.py path references
1 parent a9e7aea commit c94b859

7 files changed

Lines changed: 9 additions & 492 deletions

File tree

codeclash/arenas/bridge/Bridge.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ RUN apt-get update \
99
python3-pip python-is-python3 wget git build-essential jq curl locales \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
WORKDIR /workspace
12+
RUN git clone https://github.com/CodeClash-ai/Bridge.git /workspace \
13+
&& cd /workspace \
14+
&& git remote set-url origin https://github.com/CodeClash-ai/Bridge.git
1315

14-
# Copy Bridge game server code (game logic, deck management, scoring)
15-
COPY codeclash/arenas/bridge/game_server /workspace/game_server
16+
WORKDIR /workspace
1617

1718
# No additional dependencies needed - game logic is pure Python

codeclash/arenas/bridge/bridge.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ def validate_code(self, agent: Player) -> tuple[bool, str | None]:
6868

6969
def _run_single_simulation(self, agents: list[Player], idx: int):
7070
"""Run a single Bridge game simulation."""
71+
game_server_path = str(Path(self.environment.config.cwd) / "game_server")
7172
try:
72-
# Import BridgeGame from game_server
73-
sys.path.insert(0, str(Path(self.environment.config.cwd) / "game_server"))
73+
# Import BridgeGame from game_server (cloned from CodeClash-ai/Bridge repo)
74+
sys.path.insert(0, game_server_path)
7475
from game import BridgeGame
7576

7677
# Create game with random seed for reproducibility
@@ -167,8 +168,8 @@ def _run_single_simulation(self, agents: list[Player], idx: int):
167168
self.logger.error(f"Simulation {idx} failed with error: {e}")
168169
finally:
169170
# Clean up sys.path
170-
if str(Path(self.environment.config.cwd) / "game_server") in sys.path:
171-
sys.path.remove(str(Path(self.environment.config.cwd) / "game_server"))
171+
if game_server_path in sys.path:
172+
sys.path.remove(game_server_path)
172173

173174
def execute_round(self, agents: list[Player]):
174175
"""Execute a round of Bridge games."""

codeclash/arenas/bridge/examples/random_agent.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

codeclash/arenas/bridge/game_server/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

codeclash/arenas/bridge/game_server/deck.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

codeclash/arenas/bridge/game_server/game.py

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)