|
@@ -5,19 +5,11 @@ from random import seed
|
5
|
5
|
|
6
|
6
|
from synergine2.log import get_default_logger
|
7
|
7
|
from synergine2.config import Config
|
8
|
|
-from synergine2_cocos2d.const import SELECTION_COLOR_RGB
|
9
|
8
|
from synergine2_cocos2d.util import get_map_file_path_from_dir
|
10
|
9
|
from synergine2.core import Core
|
11
|
10
|
from synergine2.cycle import CycleManager
|
12
|
11
|
from synergine2.terminals import TerminalManager
|
13
|
12
|
|
14
|
|
-from opencombat.const import FLAG, SIDE
|
15
|
|
-from opencombat.const import FLAG_DE
|
16
|
|
-from opencombat.const import DE_COLOR
|
17
|
|
-from opencombat.const import URSS_COLOR
|
18
|
|
-from opencombat.const import FLAG_URSS
|
19
|
|
-from opencombat.simulation.subject import ManSubject
|
20
|
|
-from opencombat.simulation.subject import TankSubject
|
21
|
13
|
from opencombat.simulation.base import TileStrategySimulation
|
22
|
14
|
from opencombat.simulation.base import TileStrategySubjects
|
23
|
15
|
from opencombat.state import StateLoaderBuilder
|
|
@@ -48,45 +40,6 @@ def main(
|
48
|
40
|
state = state_loader.get_state(state_file_path)
|
49
|
41
|
subjects.extend(state.subjects)
|
50
|
42
|
|
51
|
|
- # for position in ((10, 2), (11, 3), (11, 4), (12, 5),):
|
52
|
|
- # man = ManSubject(
|
53
|
|
- # config=config,
|
54
|
|
- # simulation=simulation,
|
55
|
|
- # position=position,
|
56
|
|
- # properties={
|
57
|
|
- # SELECTION_COLOR_RGB: DE_COLOR,
|
58
|
|
- # FLAG: FLAG_DE,
|
59
|
|
- # SIDE: 'AXIS',
|
60
|
|
- # }
|
61
|
|
- # )
|
62
|
|
- # subjects.append(man)
|
63
|
|
- #
|
64
|
|
- # for position in ((30, 15), (31, 16), (32, 17), (33, 18),):
|
65
|
|
- # man = ManSubject(
|
66
|
|
- # config=config,
|
67
|
|
- # simulation=simulation,
|
68
|
|
- # position=position,
|
69
|
|
- # properties={
|
70
|
|
- # SELECTION_COLOR_RGB: URSS_COLOR,
|
71
|
|
- # FLAG: FLAG_URSS,
|
72
|
|
- # SIDE: 'ALLIES',
|
73
|
|
- # }
|
74
|
|
- # )
|
75
|
|
- # subjects.append(man)
|
76
|
|
- #
|
77
|
|
- # for position in ((38, 24),):
|
78
|
|
- # man = TankSubject(
|
79
|
|
- # config=config,
|
80
|
|
- # simulation=simulation,
|
81
|
|
- # position=position,
|
82
|
|
- # properties={
|
83
|
|
- # SELECTION_COLOR_RGB: URSS_COLOR,
|
84
|
|
- # FLAG: FLAG_URSS,
|
85
|
|
- # SIDE: 'ALLIES',
|
86
|
|
- # }
|
87
|
|
- # )
|
88
|
|
- # subjects.append(man)
|
89
|
|
-
|
90
|
43
|
simulation.subjects = subjects
|
91
|
44
|
|
92
|
45
|
core = Core(
|
|
@@ -112,7 +65,8 @@ if __name__ == '__main__':
|
112
|
65
|
parser = argparse.ArgumentParser(description='Run TileStrategy')
|
113
|
66
|
parser.add_argument('map_dir_path', help='map directory path')
|
114
|
67
|
parser.add_argument('--seed', dest='seed', default=None)
|
|
68
|
+ parser.add_argument('--state', dest='state', default=None)
|
115
|
69
|
|
116
|
70
|
args = parser.parse_args()
|
117
|
71
|
|
118
|
|
- main(args.map_dir_path, seed_value=args.seed)
|
|
72
|
+ main(args.map_dir_path, seed_value=args.seed, state_file_path=args.state)
|