Code Monkey home page Code Monkey logo

multiplayerchess's Introduction

๐ŸŽฒ Multiplayer Console Chess built with Sockets in C

This project is a two-player console-based chess game built using sockets in C. The game allows players to connect to a server and play a game of chess with each other.

๐ŸŽฅ Showcase

Check out this YouTube video to see the project in action!

๐Ÿ•น๏ธ How to Play

To play the game, you need to first build and run the server and then connect two clients to it.

๐Ÿ’ป Linux Build

To compile this project, run the ./build.sh command to generate the executable files.

To launch the server, use the ./server command.

For each client you want to connect, execute the ./client 127.0.0 5005 command.

๐Ÿ› ๏ธ Overview

This project consists of three components:

Server Script

The Server Script acts as a supervisor for the game of chess. It creates a socket for the two clients to connect to and then forks and creates a session for them. The server serves as a central point for both clients, as it relays the moves between them.

Client Script

The Client Script requires an IP and port to connect to the server, and each client receives the other's move from the server before sending their own move.

ChessBoard Script

The Chessboard contains all the functions related to the game of chess, from printing the board to validating moves for each piece. It also checks if either king has been captured, although there are no checks in this game mode.

๐Ÿš€ Future Development

  • Adding game mode with check detection
  • Adding an AI mode
  • Adding an option for players to save and load games

๐ŸŽ–๏ธ Credits

This game was developed for the Computer Networks course in the Computer Science Bachelor's program, with guidance from our professor and support from the Alexandru Ioan Cuza Iasi faculty.

๐Ÿค Contact

If you have any questions about this repository or would like to get in touch with Dragos A. Bobu, feel free to reach out to his email or website.

Feel free to contribute to this project and improve it further.

multiplayerchess's People

Contributors

drgsl 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.