Skip to content

Commit 27845b6

Browse files
committed
Organize examples directories
1 parent a9267ec commit 27845b6

File tree

10 files changed

+9
-3
lines changed

10 files changed

+9
-3
lines changed

examples/protoss/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from pathlib import Path
2+
__all__ = [p.stem for p in Path().iterdir() if p.is_file() and p.suffix == ".py" and p.stem != "__init__"]
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/terran/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from pathlib import Path
2+
__all__ = [p.stem for p in Path().iterdir() if p.is_file() and p.suffix == ".py" and p.stem != "__init__"]
File renamed without changes.

examples/zerg/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from pathlib import Path
2+
__all__ = [p.stem for p in Path().iterdir() if p.is_file() and p.suffix == ".py" and p.stem != "__init__"]
File renamed without changes.

test/test_examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from sc2 import Race, Difficulty
55
from sc2.player import Bot, Computer
66

7-
from examples.proxy_rax import ProxyRaxBot
8-
from examples.cannon_rush import CannonRushBot
9-
from examples.zerg_rush import ZergRushBot
7+
from examples.terran.proxy_rax import ProxyRaxBot
8+
from examples.protoss.cannon_rush import CannonRushBot
9+
from examples.zerg.zerg_rush import ZergRushBot
1010

1111
def run_example(race, bot):
1212
result = sc2.run_game(sc2.maps.get("Sequencer LE"), [

0 commit comments

Comments
 (0)