From 622fbf5b7d032c3df0e50e2e3bb076ab112a337c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Mon, 3 Sep 2018 14:29:47 +0200
Subject: [PATCH] Bring getting started up to date

---
 docs/gettingstarted.rst | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst
index 85dd1af9a..5af4fa8b8 100644
--- a/docs/gettingstarted.rst
+++ b/docs/gettingstarted.rst
@@ -16,6 +16,7 @@ and more.
 
    import os
 
+   from typing import Optional
    from library import *
 
 
@@ -37,10 +38,10 @@ and more.
        participant_1 = create_participants(Race.Terran, bot1)
        participant_2 = create_computer(Race.Random, Difficulty.Easy)
    
+       coordinator.set_real_time(True)
        coordinator.set_participants([participant_1, participant_2])
    
        coordinator.launch_starcraft()
-
        path = os.path.join(os.getcwd(), "maps", "InterloperTest.SC2Map")
        coordinator.start_game(path)
    
@@ -95,8 +96,8 @@ Moving on, we have the code which sets up a game of Starcraft II:
        participant_1 = create_participants(Race.Terran, bot1)
        participant_2 = create_computer(Race.Random, Difficulty.Easy)
    
+       coordinator.set_real_time(True)
        coordinator.set_participants([participant_1, participant_2])
-   
        coordinator.launch_starcraft()
 
        path = os.path.join(os.getcwd(), "maps", "InterloperTest.SC2Map")
@@ -109,8 +110,24 @@ Moving on, we have the code which sets up a game of Starcraft II:
    if __name__ == "__main__":
        main()
 
-This is where the constructor of the bot is called. If we want to play to bots 
-against each other we could change the row:
+First we create a coordinator, this is the object we use to start Starcraft.
+On the line after that the bot is constructed (the constructor is called).
+The rest of the function sets a few settings and then starts Starcraft.
+
+There are a few changes you might want to do here:
+
+Remove or comment out the following line:
+
+.. code-block:: python
+
+   coordinator.set_real_time(True)
+
+This line will make the game run at the same speed as humans play the game. 
+However, your bot might will probably be able to play the game faster. If you 
+remove or comment out this line the game will run as fast as possible, only 
+waiting for your bot to return from `on_step`.
+
+We can also play two bots against each other by changing the row:
 
 .. code-block:: python
 
@@ -124,3 +141,4 @@ to:
    participant_2 = create_participant(Race.Terran, bot2)
 
 where ``SomeOtherBot`` is a bot defined in the same way as ``MyAgent``.
+
-- 
GitLab