Skip to content

Connect4: A Classic board game Experience, Reimagined in Lua. Featuring an intuitive AI opponent

Notifications You must be signed in to change notification settings

GwyrddGlas/Connect4-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Connect4

Description

This is a simple implementation of the classic game Connect4, developed in Lua using the LOVE2D framework. Players take turns to place their counter ('Yellow' or 'Red') on a 7x7 grid, and the first player to align three of their counters horizontally, vertically, or diagonally wins the game.

Features

  • Traditional Connect4 gameplay
  • Alternating turns between two players
  • Win condition checks for rows, columns, and diagonals
  • Simple and intuitive UI
  • Play against AI

Requirements

To run this game, you need to have LOVE2D installed on your system. LOVE2D is a framework for making 2D games in Lua. You can download it from here.

Installation

Clone this repository or download the source code. Navigate to the project directory and run the game with LOVE2D:

How to Play

  • Run the game.
  • The game starts with player 'Yellow' and alternates to player 'Red'.
  • Click on an empty cell to place your counter.
  • The first player to align four of their counters in a row, column, or diagonal wins.
  • The game resets after a win.

Credits

Background Audio:

Music track: Talk by Chill Pulse
Source: https://freetouse.com/music
Royalty Free Music for Video (Safe)

connect4.png****

About

Connect4: A Classic board game Experience, Reimagined in Lua. Featuring an intuitive AI opponent

Topics

Resources

Stars

Watchers

Forks

Languages