Skip to content

SyntaxilitY/SyntaxilitY-Chess.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyntaxilitY Chess.com

Syntaxility's Chess.com project is a web application that allows users to play chess online. With fully functional game features and a user-friendly interface, users can enjoy a fun and interactive experience while learning chess strategies and techniques.

Installation

npm i express chess.js ejs socket.io

Initialization in app.js

const express   = require('express');
const socket    = require('socket.io');
const http      = require('http');
const { Chess } = require('chess.js');

// create express app
const app       = express();

// create http server and assign to app
const server    = http.createServer(app);

// create socket io server and assign to http server
const io        = socket(server);

// initialize the chess game
const chess     = new Chess();

Set the variables

// players object
let players   = {};

// current player: W = White or B = Black
// First player will be the W.
let currentPlayer = 'W';

About

Syntaxility's Chess.com project is a web application that allows users to play chess online. With fully functional game features and a user-friendly interface, users can enjoy a fun and interactive experience while learning chess strategies and techniques.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors