-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
23 lines (17 loc) · 722 Bytes
/
Copy pathscript.py
File metadata and controls
23 lines (17 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Modify this file, especially move(), to play Hunt Mouse by script."""
from collections import namedtuple
from random import choice # needed only for sample code
# Change this to False to use your script.
PLAY_MANUALLY = True
game_dimensions = 3
game_size = 5
Log = namedtuple('Log', ['movement', 'velocity'])
logs = []
def move(velocity):
"""The function run by the game to get new movements
Returns an iterable of length game_size of values from movement_operators.
Give this some better logic."""
movement_operators = ('+', '-', '')
movement = [choice(movement_operators) for _ in range(game_dimensions)] # definitely edit this
logs.append(Log(movement, velocity))
return movement