Skip to content

Commit 0a4c9aa

Browse files
author
XenGi
committed
Merge branch 'release/v0.1.1'
2 parents 05246e1 + ca23a21 commit 0a4c9aa

11 files changed

+37
-27
lines changed

Diff for: controller_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"""
1111

1212
__author__ = 'Ricardo Band'
13-
__copyright__ = 'Copyright 2013, Ricardo Band'
13+
__copyright__ = 'Copyright 2014, Ricardo Band'
1414
__credits__ = ['Ricardo Band']
1515
__license__ = 'MIT'
16-
__version__ = '0.1.0'
16+
__version__ = '0.1.1'
1717
__maintainer__ = 'Ricardo Band'
1818
__email__ = '[email protected]'
1919
__status__ = 'Development'

Diff for: emulator.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"""
1111

1212
__author__ = 'Ricardo Band'
13-
__copyright__ = 'Copyright 2013, Ricardo Band'
13+
__copyright__ = 'Copyright 2014, Ricardo Band'
1414
__credits__ = ['Ricardo Band']
1515
__license__ = 'MIT'
16-
__version__ = '0.1.0'
16+
__version__ = '0.1.1'
1717
__maintainer__ = 'Ricardo Band'
1818
__email__ = '[email protected]'
1919
__status__ = 'Development'
@@ -28,7 +28,7 @@ class Emu(object):
2828
"""
2929
The Emulator is a simple pygame game.
3030
"""
31-
def __init__(self, width=40, height=40, ip='127.0.0.1', port=1337):
31+
def __init__(self, width=50, height=28, ip='127.0.0.1', port=1337):
3232
"""
3333
Creates a screen with the given size, generates the matrix for the
3434
Mate bottles and binds the socket for incoming frames.
@@ -99,4 +99,4 @@ def gameloop(self):
9999

100100
if __name__ == '__main__':
101101
EMU = Emu()
102-
EMU.gameloop()
102+
EMU.gameloop()

Diff for: game_example.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"""
1212

1313
__author__ = 'Ricardo Band'
14-
__copyright__ = 'Copyright 2013, Ricardo Band'
14+
__copyright__ = 'Copyright 2014, Ricardo Band'
1515
__credits__ = ['Ricardo Band']
1616
__license__ = 'MIT'
17-
__version__ = '0.1.0'
17+
__version__ = '0.1.1'
1818
__maintainer__ = 'Ricardo Band'
1919
__email__ = '[email protected]'
2020
__status__ = 'Development'
@@ -138,8 +138,11 @@ def gameloop(self):
138138
self.render()
139139
except KeyboardInterrupt:
140140
pass
141+
# don't forget to quit the controller process if your game ends.
142+
# In future releases this will be done automatically.
143+
self.ctlr.quit()
141144

142145

143146
if __name__ == '__main__':
144-
GAME = Game('127.0.0.1', 1337, 40, 40)
145-
GAME.gameloop()
147+
GAME = Game('127.0.0.1', 1337, 50, 28)
148+
GAME.gameloop()

Diff for: pymlgame/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22

33
__author__ = 'Ricardo Band'
4-
__copyright__ = 'Copyright 2013, Ricardo Band'
4+
__copyright__ = 'Copyright 2014, Ricardo Band'
55
__credits__ = ['Ricardo Band']
66
__license__ = 'MIT'
7-
__version__ = '0.1.0'
7+
__version__ = '0.1.1'
88
__maintainer__ = 'Ricardo Band'
99
__email__ = '[email protected]'
1010
__status__ = 'Development'

Diff for: pymlgame/clock.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"""
66

77
__author__ = 'Ricardo Band'
8-
__copyright__ = 'Copyright 2013, Ricardo Band'
8+
__copyright__ = 'Copyright 2014, Ricardo Band'
99
__credits__ = ['Ricardo Band']
1010
__license__ = 'MIT'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__maintainer__ = 'Ricardo Band'
1313
__email__ = '[email protected]'
1414
__status__ = 'Development'

Diff for: pymlgame/controller.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"""
66

77
__author__ = 'Ricardo Band'
8-
__copyright__ = 'Copyright 2013, Ricardo Band'
8+
__copyright__ = 'Copyright 2014, Ricardo Band'
99
__credits__ = ['Ricardo Band']
1010
__license__ = 'MIT'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__maintainer__ = 'Ricardo Band'
1313
__email__ = '[email protected]'
1414
__status__ = 'Development'
@@ -115,6 +115,12 @@ def get_events(self):
115115
ret.append(self.queue.pop(0))
116116
return ret
117117

118+
def quit(self):
119+
"""
120+
Kill the Controller process.
121+
"""
122+
self.server.server_close()
123+
118124

119125
class Event(object):
120126
"""

Diff for: pymlgame/locals.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"""
66

77
__author__ = 'Ricardo Band'
8-
__copyright__ = 'Copyright 2013, Ricardo Band'
8+
__copyright__ = 'Copyright 2014, Ricardo Band'
99
__credits__ = ['Ricardo Band']
1010
__license__ = 'MIT'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__maintainer__ = 'Ricardo Band'
1313
__email__ = '[email protected]'
1414
__status__ = 'Development'

Diff for: pymlgame/screen.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"""
66

77
__author__ = 'Ricardo Band'
8-
__copyright__ = 'Copyright 2013, Ricardo Band'
8+
__copyright__ = 'Copyright 2014, Ricardo Band'
99
__credits__ = ['Ricardo Band']
1010
__license__ = 'MIT'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__maintainer__ = 'Ricardo Band'
1313
__email__ = '[email protected]'
1414
__status__ = 'Development'

Diff for: pymlgame/surface.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"""
66

77
__author__ = 'Ricardo Band'
8-
__copyright__ = 'Copyright 2013, Ricardo Band'
8+
__copyright__ = 'Copyright 2014, Ricardo Band'
99
__credits__ = ['Ricardo Band']
1010
__license__ = 'MIT'
11-
__version__ = '0.1.0'
11+
__version__ = '0.1.1'
1212
__maintainer__ = 'Ricardo Band'
1313
__email__ = '[email protected]'
1414
__status__ = 'Development'

Diff for: setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"""
77

88
__author__ = 'Ricardo Band'
9-
__copyright__ = 'Copyright 2013, Ricardo Band'
9+
__copyright__ = 'Copyright 2014, Ricardo Band'
1010
__credits__ = ['Ricardo Band']
1111
__license__ = 'MIT'
12-
__version__ = '0.1.0'
12+
__version__ = '0.1.1'
1313
__maintainer__ = 'Ricardo Band'
1414
__email__ = '[email protected]'
1515
__status__ = 'Development'

Diff for: tests.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"""
77

88
__author__ = 'Ricardo Band'
9-
__copyright__ = 'Copyright 2013, Ricardo Band'
9+
__copyright__ = 'Copyright 2014, Ricardo Band'
1010
__credits__ = ['Ricardo Band']
1111
__license__ = 'MIT'
12-
__version__ = '0.1.0'
12+
__version__ = '0.1.1'
1313
__maintainer__ = 'Ricardo Band'
1414
__email__ = '[email protected]'
1515
__status__ = 'Development'
@@ -227,7 +227,8 @@ def setUp(self):
227227
TEST_RPC_PORT))
228228

229229
def tearDown(self):
230-
self.controller.server.server_close()
230+
self.controller.quit()
231+
# just wait a second for the socket to close
231232
time.sleep(1)
232233

233234
def test_uid(self):

0 commit comments

Comments
 (0)