Skip to content

louiswu0408/fourinarow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Four-in-a-Row

Four-in-a-Row is a console-based Java implementation of the classic Connect Four game. Two players take turns dropping their pieces into a 7x7 grid, aiming to get four in a row — horizontally, vertically, or diagonally.


Features

  • 7x7 game board displayed in the console
  • Two-player turn-based gameplay
  • Input validation to prevent invalid moves
  • Automatic detection of win and tie conditions
  • Error handling for non-integer inputs

How to Run

Prerequisites

  • Java JDK installed (version 8 or higher)
  • Git (optional, for cloning the repository)

Steps

  1. Clone the repository:
git clone https://github.com/louiswu0408/fourinarow.git
cd fourinarow/fourinarow
  1. Compile the Java files
javac *.java
  1. Run the game
cd ..
java fourinarow.Fourinarow

About

Four-in-a-Row is a simple command-line Java implementation of the classic Connect Four game. Two players take turns dropping their pieces into a 7x7 grid, trying to get four pieces in a row — horizontally, vertically, or diagonally — before the opponent does.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages