Returning put_mine instead return None
This commit is contained in:
@@ -30,8 +30,7 @@ class Minesweeper:
|
|||||||
col = random.randrange(0, self.cols)
|
col = random.randrange(0, self.cols)
|
||||||
|
|
||||||
if self.is_mine(row, col):
|
if self.is_mine(row, col):
|
||||||
self.put_mine()
|
return self.put_mine()
|
||||||
return
|
|
||||||
|
|
||||||
self.board[row][col] = -1
|
self.board[row][col] = -1
|
||||||
return row, col
|
return row, col
|
||||||
|
|||||||
Reference in New Issue
Block a user