In this series, we will create a command-line based Connect Four game in Python. And in this video, we are going to refactor the code into a class. Therefor, we first create an init-method and after that we go through each helper function and decide whether it should become a method of the class or remain a regular function.
Links:
GitHub Repo: https://github.com/SebastianMantey/Connect-Four-Game
Timestamps:
0:00 - Intro
0:34 - The init method
5:29 - "create_grid" and "show"
9:53 - "make_move_w_animation"
11:51 - "is_four_connected"
12:43 - "is_column_full"
14:13 - "is_game_over"
15:52 - "ask_play_again"
21:29 - "make_move"
21:52 - "simulate_moves"
22:50 - "choose_column_ai"
24:20 - "clear_previous_line" and "give_feedback"
24:47 - Testing the game