Skip to content

Abhinav-Prajapati/quick-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quick Chess

Quick Chess is a simple web-based chess game server implemented in Go, using the Gin framework for HTTP routing and Gorilla WebSockets for real-time communication between clients and the server. It allows players to create and join chess games and play against each other in real-time.

Features

  • Create new chess games with unique identifiers.
  • Join existing chess games as a player.
  • Real-time updates of game state using WebSockets.
  • Supports multiple concurrent games.

Installation

  1. Clone the repository:
git clone https://github.com/Abhinav-Prajapati/quick-chess
  1. Install dependencies:
go get -u github.com/gin-gonic/gin
go get -u github.com/gin-contrib/cors
go get -u github.com/gorilla/websocket
go get -u github.com/notnil/chess
  1. Build and run the server:
go run main.go
  1. Access the server at http://localhost:8080.

Usage

Creating a New Game

To create a new game, make a GET request to /newgame/:gameid, where :gameid is a unique identifier for the game. Example:

GET http://localhost:8080/newgame/game123

Playing the Game

Once two players have joined the game, they can start playing by making WebSocket connections to the server. The server sends real-time updates of the game state using WebSockets.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published