Python Connect 4 Tutorial

preview_player
Показать описание
Learn how to code a command line Connect 4 game using Python.

🧠 Concepts Covered:

- Creating a game loop
- Accessing 2d Arrays
- Error handling

🌎 Find Me Here:

#Python #Tutorial #Connect4
Рекомендации по теме
Комментарии
Автор

Really helpful dude. I've been trying to do a check_winner function for the past couple of hours and I'm missing it. This is really helping!

twattusbobble
Автор

hey, could you explain how I would be able to do this using a dictionary instead of the array, to set the format?

Dazzoh
Автор

when checking the winner i would use the last move as information so i avoid searching the full board

tomyman
Автор

Very useful video you inspire me if become a coder

hieutdq
Автор

it giving me a error



BOARD_COLS=7
BOARD_ROWS=6

class Board():
def_init_(self):
self.board=[[' 'for_in range(BOARD_COLS)]for_in range(BOARD_ROWS)

antzareuz
Автор

Hi Spencer, that's a great tutorial which inspired me to create my own version of the game. Would it be very difficult to create option for 1 player with a computer? thanks

Alicia-rrnw
Автор

Quick question I made a connect 4 game using pygame but I want to highlight the winning move with a line any ideas on how to do that?

nilanpindoria
Автор

Hey man, thanks so much for the above, quick question,
How do you handle an instance where the column is full?

briancheye
Автор

Hey spencer is there a way to have multiple rounds but with the same board?:For example when the round is over the winning 4 as well as the ones that are in touch with them would be deleted and if there are any enemy symbols above they would slide down in the new empty spots . I was trying to implement it my self for a school project but couldnt do it :C .Thanks in advance!

strqfeskills
Автор

Hello Spencer,

How do you keep score?

AD-dghc