Giter Club home page Giter Club logo

tic-tac-toe's Introduction

Tic-Tac-Toe

This is custom implementation with minor improvements of a popular board game "Five in a row"(or "Gomoku", or tic-tac-toe an enlarged board). Where you play against AI.

Try it here: https://game-five-in-a-row.herokuapp.com/ (Maybe it will be necessary to wait a bit before game starts)

tic-tac-toe.png.png

How to play?

The aim of the game is to form a sequence of 5 (or more) noughts or crosses in a row (vertically, horizontally or diagonally).

Two players make actions one by one (placing cross or nought in any free cell on a board). The player who creates such sequence first wins the game.

How to run?

Backend written in kotlin with java 11. Probably can be build and run on highest java versions. Frontend written with Angular 13.

There are two game modes: console and web.

  1. Console mode. It developed mostly for local testing, so more mistakes can be found.
    1. Enter root directory cd tic-tac-toe
    2. Build whole application mvnw clean package
    3. Run console app
    cd tic-tac-toe-console/target
    java -jar tic-tac-toe-console-0.1.0-jar-with-dependencies.jar
    
    1. Enjoy the game! Be careful setting the high difficulty level. It can be slow.
  2. Web mode.
    1. Enter root directory cd tic-tac-toe
    2. Build whole application mvnw clean package
    3. Start ui
      cd tic-tac-toe-frontend
      ng serve --open
      
    4. Start backend api
      cd tic-tac-toe-web/target
      java -jar tic-tac-toe-web-0.1.0-jar-with-dependencies.jar
      
    5. Enjoy the game! To make it more interesting you can add obstacles on a board by selecting obstacles checkbox on ui.

AI algorithm

The AI is created with minimax algorithm and alpha-beta pruning.

A bit about repository structure.

Repository contains multiple modules where main module with all game logic is tic-tac-toe-core.

tic-tac-toe-console and tic-tac-toe-web can be considered as different clients for core module which allow to play through different interfaces.

tic-tac-toe-frontend contains web ui written with Angular.

tic-tac-toe-repository is a development for future to allow play the game with another person.

Bugs, improvements

Just create an issue or PR for any reason.

tic-tac-toe's People

Contributors

alesiks avatar sychuan avatar

Watchers

 avatar  avatar

tic-tac-toe's Issues

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.