Custom Roulette Multiplayer game with 2 players - C console program - urgent needed in 16 hours

Tamamlanmış İlan edilme: 5 yıl önce Teslim sırasında ödenir
Tamamlanmış Teslim sırasında ödenir

URGENT! I need it in 16 hours from now - you read it right, I know it's tight, but these are my terms. Please only apply if you are 100% sure you can complete it.

Quick summary: Console application (no gui!) written in C programming language one server, one client application.

A basic TCP sample for Server and Client uploaded - not mandatory to use exactly this, but it should be very similar. And should run without issues on Ubuntu Linux.

Custom Roulette Multiplayer game with 2 players

What is expected: C program (server and client) using socket programing. The program (server and clients) will run on the same PC using localhost as the IP address.

Game rules:

2 Players (same client code).

Roulette table with numbers 0-9.

In each round players can bet with their chips, possible bets: 1, 2 or 3 chips.

Players can guess one number, two numbers, and 3 numbers. If they guess one number and they win, the win rate is x6, if they guess with 2 numbers and one of them is a win, the win rate is x3, with 3 guesses the win rate is x2.

For example if Player1 bet with 3 chips they will win 18, 9, 6 chips if they guessed with 1, 2, 3 numbers.

If the player can't guess a winning number they'll lose the amount of chips they used to bet. The player who has the most chips by the end of the game wins.

How the program should work:

1) The server will get the amount of chips and the number of rounds as a command line parameter. example: ./[login to view URL] 6 6 5 (so player1 and 2 will get 6 chips and the game will have 5 rounds)

2) After the server launched it will wait for 2 players (clients) to join and display this message: "Waiting for players."

3) When the first client joins, the server will display: "One more player needed."

4) Once both clients join, the game should start automatically and will tell the clients how many chips they have and how many rounds the game will have.

The server's job is to arrange and track the game:

- ask the clients to place a bet

- when both players made their bet, "roll" the Roulette and generate a random number between 0-9.

- Evaluate the results according to the Game rules and display the following info for each player: "Bet: X | Won: Y" - where X is the amount of chips they used as a bet and Y the amount they won in that round.

The winner is who will have the most chips after the last round.

If one player loses all their chips the game is over and they lose (the other player wins).

When the game ends the server should message both clients and tell who is the winner and display the scores for both players.

What is expected mid-game:

Exception handling: players can't enter incorrect values, only numbers from 0-9 (up to 3), no negative values and they can't bet with more chips than they have - display error messages for these cases.

Players can stop the game at any time, by sending the message "Stop". In this case the game will display the current scores along with a message: "PlayerX cancelled the game." - where X is the client who cancelled.

When the game ends:

- any client can restart the game by sending the message "restart", in this case a new game starts with the same rules (the number of rounds and chips is the same).

- any client can end the game by sending the message "End" - in this case all 3 windows (server and the two clients) close.

If they enter a message different than this say "Incorrect command".

Commenting the code is important and explain what each function does. This is a project for educational purposes keep it as simple as possible using the sample server and client code, do not use threading and forking it's not needed.

What is expected: server.c and client.c (not two separate client for player 1 and 2).

C Programlama Linux

Proje NO: #18386475

Proje hakkında

3 teklif Uzak proje Aktif 5 yıl önce

Seçilen:

Developer000

Feel fee to contact me for the project on Custom Roulette Multiplayer game with 2 [login to view URL] me message to discuss more details .We provide the comments,images,videos,demos and live sessions in order to help th Daha Fazla

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% EUR
(23 Değerlendirme)
5.3

Bu iş için 3 freelancer ortalamada €52 teklif veriyor

anshsparkle

HELLO I CAN START RIGHT NOW - I AM EXPERT IN C Programming Linux and I BET YOU CANNOT FIND BETTER FREELANCER THAN ME ... pLEASE MESSEGE ME AND LETS DISCUSS THE THINGS THANKS

€55 EUR in 10 gün içinde
(1 Yorum)
0.4
trustworthyDev

Hello I have rich experience in c programming so that I can do your job. Please contact me for more details. Best regard Vu D

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% EUR
(0 Değerlendirme)
0.0