ProjectBeta
Rock-Paper-Scissors (Java)
Challenging
528 completions
~ 19 hours
4.0 This content is new. Please help us improve it by reporting bugs if you encounter them.
A playable Rock-Paper-Scissors game, with a Player vs. Computer mode. Practice using arrays, the Random class, formatted strings, and algorithms.
Provided by
JetBrains Academy
About
If you’ve ever wanted to create games, this project will get you started! In this project, you will code a Rock-Paper-Scissors-Lizard-Spock game, a more advanced version of Rock-Paper-Scissors and play against the computer.
Training project
This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.
What you'll learn
Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Before learning how to play the game properly, let’s learn how to cheat! Using conditional statements, you’ll write a program that always defeats the human player in the Rock-Paper-Scissors game.
Let’s not mess with the player too much, though: from now on, we’re going to play fair. You’ll be able to do this with the help of the random module, while string formatting will assist you in announcing the result of the game.
Can’t stop, won’t stop! A single game is never enough. Learn about loops in Java and apply them to make multiple game rounds possible.
It’s time to find out who the best Rock-Paper-Scissors player is. You are going to need the basics of file handling to read the records of the results of previous games, as well as tally the user’s score in the current game.
Let's raise the stakes, shall we? In the final stage of the project, your program will let the player choose what options will be used in the game and how many of them will be there. This will require some more advanced knowledge about lists in Java.
Reviews
6 months ago
I have learned handle inputs, looping and more about collections. Input, function, output.
4.0
Learners who completed this project within the Introduction to Java course rated it as follows: