From 7aa88a0c19db5e79d2c54b723aba313e1e5e5da2 Mon Sep 17 00:00:00 2001 From: James Gilles Date: Sun, 14 Jan 2018 10:05:17 -0500 Subject: [PATCH] Fix build --- battlecode-engine/src/controller/mod.rs | 2 +- examplefuncsplayer-python/run.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/battlecode-engine/src/controller/mod.rs b/battlecode-engine/src/controller/mod.rs index d29dead..858f61a 100644 --- a/battlecode-engine/src/controller/mod.rs +++ b/battlecode-engine/src/controller/mod.rs @@ -167,7 +167,7 @@ impl GameController { turn: TurnMessage { changes: vec![] }, stream: Some(stream), player_key: Some(player_key), - time_left_ms: 10000, + time_left_ms: Some(turn.time_left_ms) }) } diff --git a/examplefuncsplayer-python/run.py b/examplefuncsplayer-python/run.py index 217186c..b9fa1ef 100644 --- a/examplefuncsplayer-python/run.py +++ b/examplefuncsplayer-python/run.py @@ -2,6 +2,7 @@ import random import sys import traceback +import time import os print(os.getcwd()) @@ -30,7 +31,7 @@ while True: # We only support Python 3, which means brackets around print() - print('pyround:', gc.round()) + print('pyround:', gc.round(), 'left', gc.get_time_left_ms()) # frequent try/catches are a good idea try: