-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.cs
More file actions
43 lines (33 loc) · 1.18 KB
/
Player.cs
File metadata and controls
43 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
global using System;
global using System.Linq;
global using System.IO;
global using System.Text;
global using System.Collections;
global using System.Collections.Generic;
class Player
{
static void Main(string[] args)
{
var map = GameParser.ParseStartGame();
var homeCell = map.Cells[map.FriendlyBases.First()];
var _tacticeService = new TacticService(map, homeCell);
// game loop
while (true)
{
GameParser.UpdateMapForTurn(map);
var comboObjectives = _tacticeService.getObjectives();
if (comboObjectives != null)
{
comboObjectives.LogObjectives();
comboObjectives.WriteActions();
_tacticeService.UpdateObjectives();
continue;
}
Console.Error.WriteLine($"Did not find comboObjectives going to wait.");
// Write an action using Console.WriteLine()
// To debug: Console.Error.WriteLine("Debug messages...");
Console.WriteLine(Actions.WAIT());
// WAIT | LINE <sourceIdx> <targetIdx> <strength> | BEACON <cellIdx> <strength> | MESSAGE <text>
}
}
}