/Connect4

Connect 4 game built in Python using the Turtle graphics package

Primary LanguagePython

Created for: CPSC 231 Introduction to Computer Science for Computer Science Majors I

Description: A Connect 4 game created in Python using Python Turtle graphics package with a simple AI.

Methodologies:

  • Test driven development (Waterfall method)
  • Built using Wing IDE

Overview

This is a simple game built in Python using the Turtle Graphics package for Python. On starting the game the program randomly decides whether the computer or the user goes first and displays it on the bottom right corner of the screen.

c41

The AI is very simple. If it detects that the next move made by a player is going to cause a Connect 4, it will block it. Otherwise it attempts to stack on the best possible move available in either the vertical or horizontal direction.

c42

Upon winning the game the program shows the result of who won.

c43