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
54
55
56
57
58
59
60
61
62
63
64
|
Copyright (C) 2011 Russell Cohen <rcoh@mit.edu>,
Leah Alpert <lalpert@mit.edu>
See the end of the file for license conditions.
Tetris Instructions:
Run tetris.py to run the game!
One or two players can play at once.
Press UP to join the game
Once all players have joined, press DOWN to start the game
Use LEFT and RIGHT to move your shape, UP to rotate, and DOWN to make it drop faster
When you complete a line it will disappear from the board and you gain one point. Your score is displayed in binary below your board.
If you clear two or more lines at once, n-1 incomplete lines will appear at the bottom of your opponent�s board.
The blocks drop faster as players clear more lines. There are 6 possible levels
When one player�s board reaches the top of the screen, they lose and the other player wins.
If neither player loses after 4 minutes, the player with the higher score wins.
Press ESC to exit the program.
Necessary files to run tetris:
tetris.py
renderer.py
tetris_shape.py
ddrinput.py
util.py
BCTB Style guide:
Unlike the smootlight code, which was something of a hot mess, we are
going to follow actual python style conventions this time.
method_names
ClassNames
variable_names
Files are modules (like java packages --> multiple classes per file)
INDENTS ARE 2 SPACES. NOT 4. NOT 8. NOT TABS. Thanks :).
If you write something that is easily testable and mission critical, write a test for it! Put it in
the tests folder. Consult the tests folder of the smootlight code for how
to do that.
This is going to be boss.
This file is part of Burton-Conner Tetris Battle.
Burton-Conner Tetris Battle is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Burton-Conner Tetris Battle is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with Burton-Conner Tetris Battle. If not, see
<http://www.gnu.org/licenses/>.
|