Coder Social home page Coder Social logo

paradoxe35 / chess-ts Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 277 KB

Web-based chess application for playing chess online against another player or computer AI.

Home Page: https://chess-ts-xi.vercel.app

JavaScript 0.17% CSS 0.53% TypeScript 99.31%

chess-ts's Introduction

Chess TS

Chess TS screenshot

Chess TS is a web-based chess application for playing chess online against another player or computer AI.

Key Features

  • Play chess online in real-time
  • Supports two human players
  • Single player mode against AI bot
  • 3 difficulty levels for AI opponent
  • AI suggests best next moves
  • WebRTC powers real-time multiplayer
  • Time controls and timeouts to keep games moving

Coming Features

  • Castling - Allow the king and rook to make a special joint move
  • Chess timer - Track each player's time during the game
  • Protect the king - Prevent kings from being captured
  • Checkmate - A player wins if their opponent's king is under attack and has no legal move
  • Voice chat - Enable audio communication for online multiplayer
  • Game replay - Save and replay previous games from local storage

Rules and Gameplay

  • Standard chess rules and gameplay
  • Board represents standard 8x8 chess board
  • Legal moves are enforced by the app
  • Check, checkmate, stalemate, and draw detection
  • Pawn promotion when reaching last rank
  • En passant captures
  • Castling under standard rules

AI Opponent Details

  • Play against built-in chess AI in single player mode
  • 3 selectable difficulty levels
    • Easy - Makes random legal moves
    • Normal - Looks 1-2 moves ahead
    • Hard - Employs aggressive strategies and can see 3+ moves ahead
  • AI player evaluates positions and provides suggestions for optimal next moves

Technical Details

  • Built with TypeScript and React
  • React Hooks for state management
  • WebRTC used for real-time multiplayer (peer.js)
  • SVG used for rendering chess board and pieces
  • Fully responsive design supporting mobile, tablet and desktop

Getting Started

The app is not yet deployed online. To run it locally:

  1. Clone the repository
  2. Run npm install
  3. Run npm start
  4. Go to http://localhost:3000

TURN/STUN

chess-ts's People

Contributors

paradoxe35 avatar

Stargazers

 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.