Find Jobs
Hire Freelancers

parallel processing using pthreads

$10-30 USD

Complété
Publié il y a plus de 8 ans

$10-30 USD

Payé lors de la livraison
For this lab you will write a pthreads program that will simulate 5 epochs in an online game world. The world consists of four continents (numbered 0 - 3). There are three types of players. The first two are user generated players - type A and type H. The second type of player is a machine generated dragon. The following rules apply: 1. When players log on they are not given a choice which continent they will play in. Main should create four threads (one per continent). Main handles reading in player data and storing it in a global queue. The continents get players from the queue as needed, but at the beginning of the game main will choose 5 consecutive players with the first 5 going to continent 0, the second 5 to continent 1, etc. 2. There can be no more than 5 players per continent...well, 5 players and a dragon. 3. At the end of an epoch, the first two living players on each continent will be magically transported to the next continent. This is a circular shift, so players on continent 3 will go to continent 0. (I recommend keeping a queue of players for each continent) 4. New players can be allowed into the game only at the end of an epoch. So at the end of an epoch after the removal of dead bodies and transportation of other players, if a continent doesn't have 5 players, then it will get the next however many needed players from the global queue. 5. A player will fight players of a different type. The rules of engagement are as follows: a. Players always fight in groups b. Players are involved in at most one fight each epoch c. Players can be killed by opposing players. It requires two team members to kill one opponent. Examples: Num A's before Num H's before Num A's after Num H's after 5 0 5 0 4 1 4 0 3 2 3 1 2 3 1 3 1 4 0 4 0 5 0 5 6. There is always a dragon roaming around the world somewhere. Dragons roam counter to players...i.e., a dragon will move from 3 to 2 to 1 to 0 to 3. 7. Players cannot kill the dragon. NOTE: The homework descriptions is in lab 2 .
N° de projet : 8465857

Concernant le projet

2 propositions
Projet à distance
Actif à il y a 9 ans

Cherchez-vous à gagner de l'argent ?

Avantages de faire une offre sur Freelancer

Fixez votre budget et vos délais
Soyez payé pour votre travail
Surlignez votre proposition
Il est gratuit de s'inscrire et de faire des offres sur des travaux
Décerné à :
Avatar de l'utilisateur
A proposal has not yet been provided
$100 USD en 1 jour
4,9 (53 commentaires)
6,2
6,2
2 freelances proposent en moyenne $28 USD pour ce travail
Avatar de l'utilisateur
hello sir , i have strong skills on c++/python , and worked for samsung, huawei, now i am woking on SDN with c++ and python . easy homework , no more than one day wil it be done :) hope to know more details about this task. thank you very much
$30 USD en 1 jour
5,0 (1 commentaire)
1,6
1,6
Avatar de l'utilisateur
i have 2 years experience in C/C++ programming. I can write a software as soon as possible. Give me a chance . Thanks
$25 USD en 1 jour
0,0 (0 commentaires)
0,0
0,0

À propos du client

Drapeau de UNITED STATES
pairs, United States
5,0
19
Méthode de paiement vérifiée
Membre depuis sept. 14, 2015

Vérification du client

Merci ! Nous vous avons envoyé un lien par e-mail afin de réclamer votre crédit gratuit.
Une erreur a eu lieu lors de l'envoi de votre e-mail. Veuillez réessayer.
Utilisateurs enregistrés Total des travaux publiés
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Chargement de l'aperçu
Permission donnée pour la géolocalisation.
Votre session de connexion a expiré et vous avez été déconnecté. Veuillez vous connecter à nouveau.