Add a list of names to pick from. Refactor a bit to allow different simulator stages.
Create a bunch of random bots.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
from sugar.simulator import Bot
|
||||
|
||||
for i in range(0, 10):
|
||||
bot = Bot()
|
||||
bot.start()
|
||||
@@ -13,10 +13,10 @@ PresenceService.start()
|
||||
|
||||
base_path = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
bots_path = os.path.join(base_path, 'bots')
|
||||
for bot_file in os.listdir(bots_path):
|
||||
stage_path = os.path.join(base_path, 'demo')
|
||||
for bot_file in os.listdir(stage_path):
|
||||
if bot_file.endswith('.py') and bot_file != 'kiu.py':
|
||||
execfile(os.path.join(bots_path, bot_file))
|
||||
execfile(os.path.join(stage_path, bot_file))
|
||||
|
||||
mainloop = gobject.MainLoop()
|
||||
mainloop.run()
|
||||
|
||||
Reference in New Issue
Block a user