Skip to content

Commit 7422ab6

Browse files
Merge pull request Blizzard#213 from ccarterc/master
Updated main function so args are not commented
2 parents 576bf4c + f68bfdc commit 7422ab6

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docs/tutorial1.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,24 @@ The sc2_coordinator is included from sc2_api.h, you will use it to start and man
5555
The coordinator requires some preliminary information to properly start and connect
5656
to the Starcraft executable.
5757
58-
Add the following code inside the main function.
58+
Replace the `main` function with the following code:
5959
6060
```C++
61-
Coordinator coordinator;
62-
coordinator.LoadSettings(argc, argv);
61+
int main(int argc, char* argv[]) {
62+
Coordinator coordinator;
63+
coordinator.LoadSettings(argc, argv);
6364
64-
Bot bot;
65-
coordinator.SetParticipants({
66-
CreateParticipant(Race::Terran, &bot),
67-
CreateComputer(Race::Zerg)
68-
});
65+
Bot bot;
66+
coordinator.SetParticipants({
67+
CreateParticipant(Race::Terran, &bot),
68+
CreateComputer(Race::Zerg)
69+
});
6970
70-
coordinator.LaunchStarcraft();
71-
coordinator.StartGame(sc2::kMapBelShirVestigeLE);
71+
coordinator.LaunchStarcraft();
72+
coordinator.StartGame(sc2::kMapBelShirVestigeLE);
7273
74+
return 0;
75+
}
7376
```
7477

7578
> If you have started the retail binary LoadSettings should automatically load necessary settings.

0 commit comments

Comments
 (0)