Skip to content

dave21-py/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe logo

TicTacToe

Classic noughts‑and‑crosses built with JavaFX.

Java JavaFX Gradle VS Code Git Stars

View Demo · Report Bug · Request Feature


❔ Overview

This JavaFX implementation brings the timeless game of Tic‑Tac‑Toe to desktop. Two local players alternate turns, marking X or O on a 3 × 3 grid until one creates a line horizontally, vertically, or diagonally—or the board fills for a draw.


🎮 Controls

Key Action
Left Arrow Move cursor left
Right Arrow Move cursor right
Down Arrow Move cursor down
Enter / Space Place mark

(W A S D navigation works too.)


👀 Game Demo

🎬 Watch the demo

✨ TicTacToe Game Screen

Game Screen


System Requirements

macOS & Windows supported (tested on Java 21, Gradle 8).


🛠️ Quick Start

# 1) Clone the repo
git clone https://github.com/bjucps209/group-project-team-jd.git
cd group-project-team-jd

# 2) Build & run (macOS/Linux)
./gradlew clean run

#    Windows PowerShell
.\gradlew.bat clean run

Gradle Setup

gradle init --type java-application --dsl groovy --package app --test-framework junit-jupiter --use-defaults --overwrite 

Gradle commands

gradle clean build
gradle run

JavaFX Setup

Add a line to app/build.gradle
plugins {
    id 'application'
    id 'jacoco'
    id 'org.openjfx.javafxplugin' version '0.1.0'
}

Add a new block to the bottom of app/build.gradle:

javafx {
    version = "23.0.1"
    modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.media' ]
}

About

TicTacToe Java FX GUI Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages