Find Jobs
Hire Freelancers

project python Rock Paper Scissors game

$10-30 USD

Opravljeno
Objavljeno pred več kot 5 leti

$10-30 USD

Plačilo ob dostavi
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.
ID projekta: 18518895

Več o projektu

12 ponudb
Projekt na daljavo
Aktivno pred 5 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
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 v 1 dnevu
4,8 (14 ocen)
4,0
4,0
12 freelancerjev je oddalo ponudbo s povprečno vrednostjo $42 USD za to delo
Avatar uporabnika
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 v 1 dnevu
4,9 (36 ocen)
4,7
4,7
Avatar uporabnika
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 v 1 dnevu
4,9 (20 ocen)
4,3
4,3
Avatar uporabnika
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 v 1 dnevu
5,0 (5 ocen)
4,0
4,0
Avatar uporabnika
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 v 1 dnevu
4,9 (11 ocen)
3,5
3,5
Avatar uporabnika
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 v 3 dneh
5,0 (4 ocen)
2,6
2,6
Avatar uporabnika
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 v 1 dnevu
4,9 (2 ocen)
1,9
1,9
Avatar uporabnika
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 v 0 dnevu
5,0 (1 ocena)
1,2
1,2
Avatar uporabnika
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 v 3 dneh
0,0 (0 ocen)
0,0
0,0
Avatar uporabnika
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 v 1 dnevu
0,0 (2 ocen)
1,1
1,1
Avatar uporabnika
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 v 3 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava SAUDI ARABIA
Riyadh, Saudi Arabia
5,0
1
Plačilna metoda je verificirana
Član(ica) od jan. 13, 2019

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.