YOU CAN DROP NOW (if the column is full you override other ppl lmao
This commit is contained in:
parent
85de7ecd85
commit
b63c52c22b
19
main.py
19
main.py
|
|
@ -26,25 +26,22 @@ This is how the board should output:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def printBoard(board):
|
def printBoard(board):
|
||||||
print("===============")
|
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
|
for i in range(6):
|
||||||
for column in board:
|
|
||||||
row = ""
|
row = ""
|
||||||
for i in range(len(column)):
|
for column in board:
|
||||||
index = board.index(column)
|
row += "|" + column[i]
|
||||||
row += "|" + board[index][i]
|
row += "|"
|
||||||
rows.append(row+"\n")
|
rows.append(row)
|
||||||
|
|
||||||
rows = rows[::-1]
|
rows = rows[::-1]
|
||||||
|
|
||||||
toPrint = ""
|
toPrint = ""
|
||||||
for row in rows:
|
for row in rows:
|
||||||
toPrint += row
|
toPrint += (row + "\n")
|
||||||
|
|
||||||
print(toPrint)
|
|
||||||
|
|
||||||
|
print(f"===============\n{toPrint[:-1]}\n===============")
|
||||||
|
|
||||||
# Board will be 7x6.
|
# Board will be 7x6.
|
||||||
|
|
||||||
|
|
@ -80,10 +77,8 @@ while playing:
|
||||||
|
|
||||||
board[chosenColumn][tile] = turn
|
board[chosenColumn][tile] = turn
|
||||||
|
|
||||||
print(board)
|
|
||||||
printBoard(board)
|
printBoard(board)
|
||||||
|
|
||||||
input()
|
input()
|
||||||
|
|
||||||
turn = 'Y' if turn == 'R' else 'R'
|
turn = 'Y' if turn == 'R' else 'R'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user