Skip to content
System One

tsai-civ2 (Jev plays Civilization II)

Experimental full-game harness where Jev plays the original Civilization II in a browser, displaying live action probabilities.

phyous/tsai-civ2 on GitHub

Stars
2
Forks
1
Language
Python
Last push
18 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

from urllib.request import HTTPRedirectHandler, Request, build_opener


API_URL = "https://api.typesafe.ai/v1/systemone"
MAX_RESPONSE_BYTES = 1_048_576
MAX_ERROR_BYTES = 16_384
RETRY_STATUSES = frozenset({408, 429, 500, 502, 503, 504, 529})


class TypeSafeError(RuntimeError):
    """Safe to display: messages contain no credentials or remote response text."""


class ConfigurationError(TypeSafeError):
    pass

View in civ2/typesafe.py

Open on GitHub

PrimitivesChoice

More like this

Use cases this is tagged with