Find Jobs
Hire Freelancers

project python Rock Paper Scissors game

$10-30 USD

Complété
Publié il y a environ 5 ans

$10-30 USD

Payé lors de la livraison
The starter code gives you a place to begin, with Player and Game classes that are mostly empty. Over the course of the project, you will be greatly expanding the classes and methods in this program. Read the starter code, and run it on your computer to see what it does. Try importing it into the Python interpreter and experimenting with the Player and Game objects. 2. Create a player subclass that plays randomly The starter Player class always plays 'rock'. That's not a very good strategy! Create a subclass called RandomPlayer that chooses its move at random. When you call the move method on a RandomPlayer object, it should return one of 'rock', 'paper', or 'scissors' at random. Change the code so it plays a game between two RandomPlayer objects. 3. Keep score The starter Game class does not keep score. It doesn't even notice which player won each round. Update the Game class so that it displays the outcome of each round, and keeps score for both players. You can use the provided beats function, which tells whether one move beats another one. Make sure to handle ties — when both players make the same move! 4. Create a subclass for a human player. The game is a lot more interesting if you can actually play it, instead of just watching the computer play against itself. Create a HumanPlayer subclass, whose move method asks the human user what move to make. (Take another look back at the project demo to see what this can look like!) Set the program to play a game between HumanPlayer and RandomPlayer. 5. Create player classes that remember At the end of each game round, the Game class calls the learn method on each player object, to tell that player what the other player's move was. This means you can have computer players that change their moves depending on what has happened earlier in the game. To do this, you will need to implement learn methods that save information into instance variables. Create a ReflectPlayer class that remembers what move the opponent played last round, and plays that move this round. (In other words, if you play 'paper' on the first round, a ReflectPlayer will play 'paper' on the second round.) Create a CyclePlayer class that remembers what move it played last round, and cycles through the different moves. (If it played 'rock' this round, it should play 'paper' in the next round.) (Something to think about: What should these classes do on the first move?) Test each of these player classes versus HumanPlayer. 6. Validate user input The human player might sometimes make typos. If they enter roxk instead of rock, the HumanPlayer code should let them try again. (See how this works in the demo if you type something in that isn't a valid move.) 7. Announce the winner It's up to you how long the game should run. The starter code always plays three rounds, but that's not the only way it could work. You could choose to continue until the player types quit, or you could have the game run until one player is ahead by three points, or any other rule that makes sense to you. At the end of the game, have it print out which player won, and what the final scores are. 8. Check your code formatting Use the pycodestyle tool to check the formatting of your code. Make the edits that it recommends, then re-run it to see fewer and fewer warnings. By the time you're done, it should display no warnings or errors at all.
N° de projet : 18518895

Concernant le projet

12 propositions
Projet à distance
Actif à il y a 5 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
hi i would love to do your task. i 'll do unlimited revisions till satisfactorily completion of your [login to view URL] for your response...i will provide in 15 mins
$25 USD en 1 jour
4,8 (14 commentaires)
4,0
4,0
12 freelancers are bidding on average $42 USD for this job
Avatar de l'utilisateur
Hi there, I do Python programming and I have strong foundation in algorithms and data structures. I went through your requirements and I would like to do the Rock Paper Scissors game project. I know how to work with classes and object oriented principles. Let me know if you are interested.
$30 USD en 1 jour
4,9 (36 commentaires)
4,7
4,7
Avatar de l'utilisateur
Hi There I've excellent programming and development skills and knowledge. I can provide an efficient, perfect, well documented development of your Programming and Computer project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif
$30 USD en 1 jour
4,9 (20 commentaires)
4,3
4,3
Avatar de l'utilisateur
Looks like a basic university project where you have to demonstrate that you can code. I can have it ready for you within 16 hours
$30 USD en 1 jour
5,0 (5 commentaires)
4,0
4,0
Avatar de l'utilisateur
I have 5+ years of python experience. I have read the description and checked the initial code attached. I have developed a similar game project (for backgammon) very soon. In that project I had human players, random playing players and ai players. Hope we can work together. I can start immediately and finish the job quick.
$25 USD en 1 jour
4,9 (11 commentaires)
3,5
3,5
Avatar de l'utilisateur
HI! Not that complicated but funny project. Will be glad to make it for you. Let's discuss in chat, if you are interesting.
$30 USD en 3 jours
5,0 (4 commentaires)
2,6
2,6
Avatar de l'utilisateur
Hello, I am an Msc computer science student and a Java/Python expert with 5 years experience. I have read your project description and I can help you with your task following every detail and requirement. I have an history of delivering satisfactory and excellent job to my clients within a limited timeline. let's discuss more about your project in chat. thanks
$40 USD en 1 jour
4,9 (2 commentaires)
1,9
1,9
Avatar de l'utilisateur
Hello! As you can see from my profile, I'm a pro competitive programmer, extremely experienced with Python programming (more than 5 years now). I'll be glad to help you. My guarantees: - clean and efficient code - extremely fast delivery (I expect the whole job to take me no more than 2 hours) Hope to hear from you soon if you'd like to discuss. Best wishes, Vlad
$111 USD en 0 jour
5,0 (1 commentaire)
1,2
1,2
Avatar de l'utilisateur
Hello! I hope you can award me the bid! ------------------- 5. Create player classes that remember At the end of each game round, the Game class calls the learn method on each player object, to tell that player what the other player's move was. This means you can have computer players that change their moves depending on what has happened earlier in the game. To do this, you will need to implement learn methods that save information into instance variables. Create a ReflectPlayer class that remembers what move the opponent played last round, and plays that move this round. (In other words, if you play 'paper' on the first round, a ReflectPlayer will play 'paper' on the second round.) Create a CyclePlayer class that remembers what move it played last round, and cycles through the different moves. (If it played 'rock' this round, it should play 'paper' in the next round.) (Something to think about: What should these classes do on the first move?) --------------------------- This looks like fun and we can implement new things that you want!
$25 USD en 3 jours
0,0 (0 commentaires)
0,0
0,0
Avatar de l'utilisateur
Dear sir, madam I am interesting your project. I can satisfy you perfectly. I have read your description and I would like to work for you having perfect expertise in required task. I am software engineer having 5 years’ experience expert in java, C, C++, C#, python, Android, MATLAB Regards Waqar Amjad
$105 USD en 1 jour
0,0 (2 commentaires)
1,1
1,1
Avatar de l'utilisateur
Hello, Thank you for giving such a thorough description of your project, this is really helpful. I would be very interested to work on your project. As an electrical engineer specializing in computer science I have been working with Python for many years. This a simple application but fun to work on. I also have experience in machine learning so it shouldn't be too much of a challenge to build a learn method. I have a great attention to details and can garantie that I will deliver a neat user interface that matches your requirements. I would love to talk more about the details of your project. Looking forward to hear from you, Elodie Couturier
$35 USD en 3 jours
0,0 (0 commentaires)
0,0
0,0

À propos du client

Drapeau de SAUDI ARABIA
Riyadh, Saudi Arabia
5,0
1
Méthode de paiement vérifiée
Membre depuis janv. 13, 2019

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.