Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #Mark
  2.  
  3. import connectfour
  4.  
  5.  
  6. game = connectfour.new_game()
  7. game = connectfour.drop(game,4)
  8. game = connectfour.drop(game,4)
  9. game = connectfour.drop(game,4)
  10. game = connectfour.drop(game,4)
  11.  
  12. for row in game.board:
  13. print(row)
  14.  
  15. #print(connectfour.BOARD_COLUMNS)
  16. #print(len(game.board))
  17.  
  18. def print_user_board(game_state: game, amount_of_columns = 0) -> None:
  19. """prints the board the user sees"""
  20. user_board = []
  21. if amount_of_columns == (connectfour.BOARD_COLUMNS - 1):
  22. return
  23. else:
  24. for row in game.board:
  25. user_board.append(row[amount_of_columns])
  26. print(user_board)
  27. print_user_board(game, amount_of_columns + 1)
  28.  
  29.  
  30. print_user_board(game)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement