Skip to content

Commit

Permalink
New map and settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdrz-mirdamadi committed Sep 18, 2022
1 parent 1310eca commit ffabd56
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 3 deletions.
42 changes: 42 additions & 0 deletions maps/map2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"width":17,
"height":11,
"player1_coordinate":[0,0],
"player2_coordinate":[10,16],
"player3_coordinate":[0,16],
"player4_coordinate":[10,0],
"treasury_coordinate":[2,8],
"walls":[[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0],
[0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],
"fog_map":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
[0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],
"treasury_map":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
}
42 changes: 42 additions & 0 deletions maps/map3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"width":11,
"height":11,
"player1_coordinate":[8,0],
"player2_coordinate":[10,1],
"player3_coordinate":[9,0],
"player4_coordinate":[10,2],
"treasury_coordinate":[1,9],
"walls":[[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,1,0,0,0],
[0,0,0,0,0,0,1,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,0,1,0,0,1,0,0,0],
[0,0,0,1,0,0,0,0,0,0,0],
[0,0,1,0,1,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0]],
"fog_map":[[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,1,1,1,1,0,0,0,0,0],
[0,0,1,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,0,1,1,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0]],
"treasury_map":[[0,0,0,0,0,0,0,0,1,1,1],
[0,0,0,0,0,0,0,0,1,1,1],
[0,0,0,0,0,0,0,0,1,1,1],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0]]
}
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
help='First player name')
parser.add_argument('-n2', default='Team 2', type=str,
help='Second player name')
parser.add_argument('--setting', default=Path(r'src/settings.json'), type=Path,
parser.add_argument('--setting', default=Path(r'src/settings/setting1.json'), type=Path,
help='Setting JSON file path')
parser.add_argument('--log', default=Path(r'logs/{}'.format(int(time() * 1000))), type=Path,
help='Path to store logs')
Expand Down
4 changes: 2 additions & 2 deletions src/settings.json → src/settings/setting1.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"rounds": 150,
"rounds": 120,
"def_upgrade_cost": 3,
"atk_upgrade_cost": 2,
"cool_down_rate": 0.5,
"linear_attack_range": 3,
"ranged_attack_radius": 2,
"gold_count": 25,
"gold_count": 15,
"agent_sight_range": 9,
"timeout": 2,
"running_cpu_limit": 80,
Expand Down
15 changes: 15 additions & 0 deletions src/settings/setting2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"rounds": 250,
"def_upgrade_cost": 3,
"atk_upgrade_cost": 2,
"cool_down_rate": 0.5,
"linear_attack_range": 4,
"ranged_attack_radius": 3,
"gold_count": 28,
"agent_sight_range": 11,
"timeout": 2,
"running_cpu_limit": 80,
"sleeping_cpu_limit": 10,
"memory_limit": 512
}

15 changes: 15 additions & 0 deletions src/settings/setting3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"rounds": 140,
"def_upgrade_cost": 2,
"atk_upgrade_cost": 2,
"cool_down_rate": 0.75,
"linear_attack_range": 3,
"ranged_attack_radius": 2,
"gold_count": 18,
"agent_sight_range": 9,
"timeout": 2,
"running_cpu_limit": 80,
"sleeping_cpu_limit": 10,
"memory_limit": 512
}

0 comments on commit ffabd56

Please sign in to comment.