Skip to content

Alexandrress/bashorpion

Repository files navigation

Bashorpion — Minimal multiplayer turn-based game (C)

Overview

Bashorpion is a small C project that provides a simple server and client for playing turn-based matches (a two-player duel) over TCP. The codebase includes a server, a client, session and data handling, and a small JSON-based leaderboard stored in datas/leaderBoard.json.

Prerequisites

  • A C compiler (gcc/clang)
  • make
  • JSON-C development library (Ubuntu/Debian):
sudo apt update && sudo apt install build-essential libjson-c-dev

Build

From the project root run:

make

Clean build artifacts:

make clean

Running (local / same machine)

  1. Start the server:
./BashorpionServer.exe
  1. Start one or more clients (each in a separate terminal):
./BashorpionClient.exe

When starting clients you will be prompted for a server address (use 127.0.0.1 for the same machine), a port, and a username.

Common client commands (lobby):

  • list — list players in the lobby
  • leaderboard — show recorded scores from datas/leaderBoard.json
  • leave / exit — leave the lobby
  • battle <player> — challenge a player
  • accept / deny — accept or refuse an incoming challenge

During a duel:

  • play <cell> — make a move (format depends on game UI/logic)

Running over LAN

Start the server on a host machine and provide its LAN IP address to remote clients when they connect. Use distinct ports for different client instances as needed.

Leaderboard and data

Leaderboard data is persisted to datas/leaderBoard.json. Review this file to inspect or reset scores.

Documentation

This project includes minimal Doxygen notes. To generate documentation (if Doxygen is installed):

doxygen BashorpionServer.c

Notes

  • The repository ships C source files and a makefile. I did not modify source code as requested — only repository documentation and helpful files were added.

License & Contribution

See the LICENSE and CONTRIBUTING.md files for license and contribution instructions.

If anything in this README should reflect a different build or run command on your system, tell me and I will adjust it.

About

Bashorpion is a small C project that provides a simple server and client for playing turn-based matches (a two-player duel) over TCP

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors