Coder Social home page Coder Social logo

tictactoe's Introduction

tic-tac-toe

A Tic-Tac-Toe game with AI by implementing the Minimax algorithm.

How To Play

Make sure you are in the game root directory. Then run the following command in the terminal:

java -jar tictactoe.jar

Build Instructions

To build the game from source, follow these instructions:
While in game root directory, execute the following command in terminal.

javac -d class/ src/Game.java -cp src/

The -d flag is used to store the output to different directory. The -cp flag is used to specify class path. The code won't compile without this flag as there are multiple source files in different folder.
Next, change to the class directory:

cd class/

Now, just execute the game while in class directory:

java Game

To pack all classes and resources in a single file, we have to create a jar file. While in the class directory, execute the following in terminal:

jar -cmvf tictactoe.mf ../tictactoe.jar *.class

This will create a jar file in the root directory of the game. Navigate to root directory:

cd ..

To execute the jar file, just run:

java -jar tictactoe.jar

This jar file is portable. You can play the game just via this file.

Enjoy!!

tictactoe's People

Contributors

thehitchh1ker avatar

Stargazers

Battula Jashwanth Sai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.