Skip to content

Commit ffabd56

Browse files
New map and settings
1 parent 1310eca commit ffabd56

File tree

6 files changed

+117
-3
lines changed

6 files changed

+117
-3
lines changed

maps/map2.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"width":17,
3+
"height":11,
4+
"player1_coordinate":[0,0],
5+
"player2_coordinate":[10,16],
6+
"player3_coordinate":[0,16],
7+
"player4_coordinate":[10,0],
8+
"treasury_coordinate":[2,8],
9+
"walls":[[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],
10+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
11+
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
12+
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
13+
[0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0],
14+
[0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0],
15+
[0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0],
16+
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
17+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
18+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
19+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],
20+
"fog_map":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
21+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
22+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
23+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
24+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
25+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
26+
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
27+
[0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0],
28+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
29+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
30+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],
31+
"treasury_map":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
32+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
33+
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
34+
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
35+
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
36+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
37+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
38+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
39+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
40+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
41+
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
42+
}

maps/map3.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"width":11,
3+
"height":11,
4+
"player1_coordinate":[8,0],
5+
"player2_coordinate":[10,1],
6+
"player3_coordinate":[9,0],
7+
"player4_coordinate":[10,2],
8+
"treasury_coordinate":[1,9],
9+
"walls":[[0,0,0,0,0,0,0,0,0,0,0],
10+
[0,0,0,0,0,0,0,0,0,0,0],
11+
[0,0,0,0,0,0,0,0,0,0,0],
12+
[0,0,0,1,0,0,0,1,0,0,0],
13+
[0,0,0,0,0,0,1,0,0,0,0],
14+
[0,0,0,0,0,0,0,0,0,0,0],
15+
[0,0,1,0,1,0,0,1,0,0,0],
16+
[0,0,0,1,0,0,0,0,0,0,0],
17+
[0,0,1,0,1,0,0,0,0,0,0],
18+
[0,0,0,0,0,0,0,0,0,0,0],
19+
[0,0,0,0,0,0,0,0,0,0,0]],
20+
"fog_map":[[0,0,0,0,0,0,0,0,0,0,0],
21+
[0,0,0,0,0,0,0,0,0,0,0],
22+
[0,0,1,1,1,1,0,0,0,0,0],
23+
[0,0,1,0,0,0,0,0,0,0,0],
24+
[0,0,0,0,0,0,0,0,1,0,0],
25+
[0,0,0,0,0,0,0,0,1,0,0],
26+
[0,0,0,0,0,0,0,0,1,0,0],
27+
[0,0,0,0,0,0,0,0,1,0,0],
28+
[0,0,0,0,0,0,0,1,1,0,0],
29+
[0,0,0,0,0,0,0,0,0,0,0],
30+
[0,0,0,0,0,0,0,0,0,0,0]],
31+
"treasury_map":[[0,0,0,0,0,0,0,0,1,1,1],
32+
[0,0,0,0,0,0,0,0,1,1,1],
33+
[0,0,0,0,0,0,0,0,1,1,1],
34+
[0,0,0,0,0,0,0,0,0,0,0],
35+
[0,0,0,0,0,0,0,0,0,0,0],
36+
[0,0,0,0,0,0,0,0,0,0,0],
37+
[0,0,0,0,0,0,0,0,0,0,0],
38+
[0,0,0,0,0,0,0,0,0,0,0],
39+
[0,0,0,0,0,0,0,0,0,0,0],
40+
[0,0,0,0,0,0,0,0,0,0,0],
41+
[0,0,0,0,0,0,0,0,0,0,0]]
42+
}

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
help='First player name')
1616
parser.add_argument('-n2', default='Team 2', type=str,
1717
help='Second player name')
18-
parser.add_argument('--setting', default=Path(r'src/settings.json'), type=Path,
18+
parser.add_argument('--setting', default=Path(r'src/settings/setting1.json'), type=Path,
1919
help='Setting JSON file path')
2020
parser.add_argument('--log', default=Path(r'logs/{}'.format(int(time() * 1000))), type=Path,
2121
help='Path to store logs')

src/settings.json renamed to src/settings/setting1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"rounds": 150,
2+
"rounds": 120,
33
"def_upgrade_cost": 3,
44
"atk_upgrade_cost": 2,
55
"cool_down_rate": 0.5,
66
"linear_attack_range": 3,
77
"ranged_attack_radius": 2,
8-
"gold_count": 25,
8+
"gold_count": 15,
99
"agent_sight_range": 9,
1010
"timeout": 2,
1111
"running_cpu_limit": 80,

src/settings/setting2.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"rounds": 250,
3+
"def_upgrade_cost": 3,
4+
"atk_upgrade_cost": 2,
5+
"cool_down_rate": 0.5,
6+
"linear_attack_range": 4,
7+
"ranged_attack_radius": 3,
8+
"gold_count": 28,
9+
"agent_sight_range": 11,
10+
"timeout": 2,
11+
"running_cpu_limit": 80,
12+
"sleeping_cpu_limit": 10,
13+
"memory_limit": 512
14+
}
15+

src/settings/setting3.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"rounds": 140,
3+
"def_upgrade_cost": 2,
4+
"atk_upgrade_cost": 2,
5+
"cool_down_rate": 0.75,
6+
"linear_attack_range": 3,
7+
"ranged_attack_radius": 2,
8+
"gold_count": 18,
9+
"agent_sight_range": 9,
10+
"timeout": 2,
11+
"running_cpu_limit": 80,
12+
"sleeping_cpu_limit": 10,
13+
"memory_limit": 512
14+
}
15+

0 commit comments

Comments
 (0)