-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.py
More file actions
53 lines (45 loc) · 1.42 KB
/
profile.py
File metadata and controls
53 lines (45 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'sukhmel'
import cProfile as profile
from main import ReflectionPattern
starts = (
{
'profile' : True
, 'base' : (21,19)
, 'scale' : (5,5)
, 'pattern' : (True, True, None, True, False)
, 'auto_color' : False
, 'paint_auto_steps' : False
, 'timeout' : 0
, 'start_position' : (0,0)
, 'start_direction' : (1, 1)
, 'start_step' : 0
, 'profile_string' : None
}, # all values default except for profile
{
'profile' : True
, 'profile_string' : "self.flood((100, 100),(255,0,0))"
, 'base' : (816, 499)
, 'scale' : (2, 2)
, 'pattern' : [1, 0]
}, # flood speed test
{
'profile' : True
, 'base' : (816, 499)
, 'scale' : (2, 2)
, 'pattern' : [True, True, None]
, 'auto_color' : True
},
{
'profile' : True
, 'base' : (816, 499)
, 'scale' : (2, 2)
, 'pattern' : [True, True, None]
, 'auto_color' : True
, 'paint_auto_steps' : True
} # same starts with different values of 'paint_auto_step'
)
for param in starts:
game = ReflectionPattern(**param)
profile.run('game.execute()')