Skip to content

The Bidding Game,client-server game, using C POSIX, for (4) players

Notifications You must be signed in to change notification settings

pmatsa/bidding-game-posix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bidding Game - POSIX (C)

The Bidding Game, a client-server game implementation consisted of (4) clients and the server.C POSIX was used to interract with the threads.

Server initially sets up an ip,port and balance for the game to run.

$ gcc server.c -o server
$ ./server 127.0.0.1 9999 1000

Every client connects to this particular ip address:port and when (4) clients connect, the game starts.

$ gcc client.c -o client
$ ./client 127.0.0.1:9999

Explanation

  • Everyone starts with the balance set by the server and takes their place on the terrain. Terrain consists of an 9x9 array with every player settled on every corner. The so called desired object/prize is located in the middle of the terrain, or terrain[4,4].
  • Every player makes a bid on every round without any knowledge of their opponents' choices or strategy.
  • When everyone finishes bidding, a round ends and a winner for this rounds is announced. This player comes one step closer to the prize until someone actually matches the prize's position.
  • Ties are being held by an advantage point, which changes on every round consecutively for every player.
  • Player who's closer to the advantage point wins the tie.

About

The Bidding Game,client-server game, using C POSIX, for (4) players

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages