Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hlt
- from hlt import NORTH, EAST, SOUTH, WEST, STILL, Move, Square
- import random
- myID, game_map = hlt.get_init()
- hlt.send_init("RandomPythonBot")
- while True:
- game_map.get_frame()
- moves = [Move(square, random.choice((NORTH, EAST, SOUTH, WEST, STILL))) for square in game_map if square.owner == myID and square.strength > 0]
- hlt.send_frame(moves)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement