-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.py
More file actions
38 lines (32 loc) · 1.19 KB
/
testing.py
File metadata and controls
38 lines (32 loc) · 1.19 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
import sfml as sf
import sys
import WorldCreator
#############################
# ## TESTING INPUT METHODS ##
#############################
# RESOLUTION = 1024, 768
# TITLE_TEXT = "testing"
# window = sf.RenderWindow(sf.VideoMode(*RESOLUTION), TITLE_TEXT)
# alreadyPressed = False
# while window.is_open:
# eventList = window.poll_event()
# if eventList == sf.CloseEvent:
# window.close()
# elif type(eventList) == sf.KeyEvent:
# if eventList.pressed and not alreadyPressed:
# alreadyPressed = True
# print "pressed"
# if eventList.released:
# alreadyPressed = False
# print "released"
# #########################################
# ## TESTING RANDOM STAR DATA GENERATOR ##
# #########################################
# starmap = WorldCreator.StarMap()
# starmap.randomStarGenerator()
# ## Testing getData ##
# print starmap.getStarData('name','xyz10')
# ## Testing setData ##
# print "Old star data: ", starmap.getStarData('name','xyz11')
# starmap.setStarData('xyz11', (10,10,10), 10)
# print "New star data: ", starmap.getStarData('name','xyz11')