Skip to content

Commit b8ce16e

Browse files
Merge pull request #2699 from avinashkranjan/deepsource-transform-c2e01818
format code with autopep8
2 parents 30cbd4f + 3e6cc28 commit b8ce16e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Gomoku (Connect Five)/Gomoku_game.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
def create_board(size):
22
return [[' ' for _ in range(size)] for _ in range(size)]
33

4+
45
def display_board(board):
56
size = len(board)
67
for row in board:
78
print(' | '.join(row))
89
print('-' * (size * 4 - 1))
910

11+
1012
def check_win(board, row, col):
1113
size = len(board)
1214
player = board[row][col]
@@ -33,9 +35,11 @@ def check_win(board, row, col):
3335

3436
return False
3537

38+
3639
def is_board_full(board):
3740
return all(board[row][col] != ' ' for row in range(len(board)) for col in range(len(board[0])))
3841

42+
3943
def gomoku():
4044
size = 15
4145
board = create_board(size)
@@ -63,5 +67,6 @@ def gomoku():
6367
else:
6468
print("Invalid move. Try again.")
6569

70+
6671
if __name__ == "__main__":
6772
gomoku()

0 commit comments

Comments
 (0)