MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / update

Method update

projects/Tetris Game/tetrisGame.py:115–121  ·  view source on GitHub ↗

Move the tetromino down one cell

(self)

Source from the content-addressed store, hash-verified

113 return lines_cleared
114
115 def update(self):
116 """Move the tetromino down one cell"""
117 if not self.game_over:
118 if self.valid_move(self.current_piece, 0, 1, 0):
119 self.current_piece.y += 1
120 else:
121 self.lock_piece(self.current_piece)
122
123 def draw(self, screen):
124 """Draw the grid and the current piece"""

Callers 9

mainFunction · 0.95
start_gameFunction · 0.45
reDrawWindowFunction · 0.45
entryDisplayerFunction · 0.45
gameCONCLUDERFunction · 0.45
tieCheckerFunction · 0.45
playerFunction · 0.45
firstinitialiserFunction · 0.45
tesla.pyFile · 0.45

Calls 2

valid_moveMethod · 0.95
lock_pieceMethod · 0.95

Tested by

no test coverage detected