Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/m/e/Megaminer-7-HEAD/client/python/AI.py   Megaminer-7(Download)
    print "Turn:", self.turnNumber()
    print "My ID: ", self.playerID()
    print "My Gold: ", self.players[self.playerID()].getGold()
    #if you have enough gold to buy a pirate
    if self.pirateCost() < self.players[self.playerID()].getGold():
      #find a port you own
      for p in self.ports:
        if p.getOwner == self.playerID():
    for i in self.pirates:
      #if I own the pirate
      if i.getOwner == self.playerID():
        #select a random pirate from the list
        target = random.choice(pirates)