Questions tagged [rock-paper-scissors]

Rock Paper Scissors is a game where two (or more) players compete against each other, with each player picking rock, paper, or scissors.

Filter by
Sorted by
Tagged with
40
votes
4answers
4k views

Rock-Paper-Scissors-Lizard-Spock Challenge

"Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitate lizard, lizard eats paper, paper ...
22
votes
6answers
4k views

Rock, Paper, Scissors, Lizard and Spock

I am currently done with this little Rock, Paper, Scissors, Lizard, Spock game in JavaScript. The game is working fine, but I am not pleased with the code. Is there a way to refactor these ...
22
votes
4answers
3k views

Rock-Paper-Scissors

I was given this exercise: Build a game in which two players compete in a game of Rock-Paper-Scissors with different strategies. Who will win more rounds? The rules: Scissors beats ...
18
votes
6answers
4k views

Rock, Paper Scissors game in Python

I wrote a simple Rock, Paper Scissors game in Python for class. As a beginner, I would like some input as to how I could abstract or make my code smoother. I feel like the repeated use of ...
17
votes
3answers
4k views

RPSLS Game in C#

I went with what I know and can use well, not what I know and can't figure the syntax out to make it look good. So please enjoy the code and prepare to school me (probably in the basics) in C# ...
17
votes
2answers
3k views

Rock-Paper-Scissors-Lizard-Spock challenge in C++

Here's my take at the Rock-Paper-Scissors-Lizard-Spock challenge. The outcomes are as follows: Scissors cuts paper paper covers rock rock crushes lizard lizard poisons Spock Spock ...
15
votes
3answers
1k views

Basic Rock-Paper-Scissors implementation

I decided to try to make a simple RPS implementation in Java 8, the following notes should be said first: At a later point it should support RPSLS aswell, as any other Gesture-game variant. At a ...
15
votes
1answer
667 views

Cheese-Burger-Waffles (aka Rock-Paper-Scissors)

FizzBuzz was fun, and I got great feedback and learned a few things (which I hope I put in practice here), but only scratched the surface. I wanted to explore the LOLCODE language a bit more, so I ...
14
votes
6answers
3k views

Rock-Paper-Scissors game for learning purposes

I just want your opinions about my code. How could I improve it? Is there a better method to do it? ...
14
votes
2answers
2k views

Rock Paper Scissors Lizard Spock Revisited

Continuing the spirit of the recent Weekend Challenge, here is a revised version of the RPSLS game. This is a follow up to my previous submission: Rock Paper Scissors Lizard Spock as a code-style ...
13
votes
3answers
3k views

Stone, Paper, Scissors in Python

Recently I started programming with python. Today I was trying to make a stone, paper, scissor game. After so scratching my head long time, finally I got a working code. ...
12
votes
2answers
5k views

Rock Paper Scissors game using OOP

I'm a complete beginner to Java and we have just started learning objects and classes in school. I'm trying to create a very simple text-based Rock Paper Scissors game. I do realise that my code is a ...
12
votes
3answers
456 views

RPSLS is less messy now, but is it clean?

This is a follow up to the following questions: RPSLS Game in C# Ensuring user input is an integer in a range I haven't made my way to DecideWinner() yet, but ...
12
votes
6answers
16k views

Does my Rock Paper Scissors game look good?

I'm doing some homework and am just curious if everything I've done looks good and/or if you'd suggest I modify something to keep with "javaese." ...
12
votes
2answers
788 views

Another Rock Paper Scissors Lizard Spock implementation

The Challenge Create an implementation of "Rock - Paper - Scissors - Lizard - Spock". The rules: Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes ...
12
votes
2answers
20k views

Rock Paper Scissors in one single method in Java - Good or bad?

I'm new to programming and have created a simple Rock, Paper, Scissors game. The entire program is under a single class and the main method. I hear that's probably not the best way to code. How ...
12
votes
1answer
139 views

RPSLSMB OOP Version 2

Rock Paper Lizard Spock Monkey Banana My original post Based off of Malachi's post I've changed the way rules work in this version to allow ties to result in double loss or double win. While ...
11
votes
7answers
4k views

Rock Papers Scissors in Python

I am a newbie to Python and have started object-oriented programming recently. I have implemented a "Rock Paper Scissors" application in OOP. I would like for you to evaluate my code, and tell me ...
11
votes
2answers
920 views

Rock, paper, scissors

This is something I wrote as a reply to a deleted "Rock/paper/scissors [updated]" question. Since I can't post it as an answer (and the line-by-line analysis is gone as well), it might be nice to get ...
11
votes
2answers
1k views

Rock-Paper-Scissors-Lizard-Spock Challenge, take 2

This post is following-up on Rock-Paper-Scissors-Lizard-Spock Challenge I had a gut feeling that I was somehow abusing IComparable<T>, @svick's answer ...
11
votes
2answers
3k views

Rock Paper Scissors Lizard Spock as a code-style and challenge

The following is a program that lets a Human play "Rock Paper Scissors Lizard Spock" against the computer... (almost playable at: http://ideone.com/EBDlga) Note I have posted a follow-up question ...
10
votes
3answers
12k views

Rock, Paper, Scissors Game in Java

I made a Rock, Paper, Scissors game and would like the code to be reviewed. Main class: ...
10
votes
3answers
6k views

A Simple Rock, Paper, Scissors program

I wrote a rock, paper, scissors program. It works fine, but I'm curious if there are any constructive critiques, tips, tricks, comments, or advice anyone may have on how the code operates, performs, ...
10
votes
2answers
3k views

Rock, Paper, Scissors - Python game

This is my attempt at making a 'rock, paper, scissors' game in python. The game takes the user's input and the computer's random selection and calculates who has won. All feedback appreciated. ...
10
votes
2answers
213 views

RPSLS yet again

I guess I'm a little late with my entry to this code challenge mentioned here, but I decided the world must need yet another RPSLS implementation to critique. ...
9
votes
5answers
43k views

Simple Rock, Paper, Scissors in Python

I have looked at many different approaches to this game online, but as someone who isn't very experienced with Python, I may not be aware of what others are doing right. ...
9
votes
4answers
1k views

Scissors, Paper, Rock in Python

The game works, but I was wondering if anyone could help me with better structure for the code, simplification, or just any other improvements. ...
8
votes
3answers
5k views

Rocks, Paper Scissors game

I wrote a Rock Paper Scissors game and was hoping to get some feedback on issues like: Am I utilizing object oriented techniques correctly? What can I do better? Am I using ...
8
votes
1answer
5k views

Rock Paper Scissors in JavaScript

In a few weeks I need to give a workshop about JavaScript to colleagues. They do not have much experience with JavaScript so I will explain the basics of JavaScript. At the end of the day I want them ...
8
votes
3answers
173 views

RPSLS refactored to Object Oriented

I wrote a couple reviews for this CR post. In my most recent review, I refactored @Malachi 's code to fit OO design. I'm looking for any advice/hints/criticisms on it. A review is welcome for both ...
8
votes
3answers
5k views

Python 3.6 Rock-Paper-Scissors game

I was asked to write a "Rock Paper Scissors" game as a practice exercise for class. I ended up with this code which works as intended. It's a one player vs. the computer game. Overview: Computer and ...
8
votes
2answers
818 views

Simple Rock Paper Scissors in C++

I have made a Rock Paper Scissors game. It works fine but I would like to know how can I improve it further. ...
8
votes
2answers
312 views

Rock, Paper, Whatever - A small commandline game

My rational for this program, was to learn more of Python's standard library, I didn't actually know cmd was even in it until I started this program. It's also the ...
8
votes
3answers
301 views

Procedural style Rock Paper Scissors game using Python 3

I am a newbie to Python and am trying to do the Rock, Paper and Scissors game to revise my knowledge that I have earned so far. Overview of the program: This is a two-player game Ask for player ...
8
votes
2answers
2k views

Rock-Paper-Scissors-Lizard-Spock game

There was a fairly strangely written RPSLS game on Stack Overflow here. That inspired me (read: I was bored and figured it would be fun) to write a better one. But I'm not sure what else there is ...
7
votes
3answers
394 views

RPSLS game revisited. Is my design better than previous attempts?

This question is a follow up to these questions: RPSLS Game in C# Ensuring user input is an integer in a range RPSLS is less messy now, but is it clean? Right now I have a couple of ideas in the ...
7
votes
4answers
847 views

Index mechanics for Rock Paper Scissors

I just went through a very easy online example creating a Rock-Paper-Scissors game, but it seemed like it was not a great use of computing power. It seemed like I was writing out results for every ...
7
votes
2answers
3k views

Rock-paper-scissors Game in C++

Below you will find my first attempt at a C++ implementation of the classic game Rock-paper-scissors. If someone could look it over and point out or suggest any things that I could change to improve ...
7
votes
5answers
2k views

RockPaperScissor Game

I have been studying C#, and I am trying to model the "Rock / Paper / Scissors" game. Is my program reasonable or is there anything I need to improve? user input a round. user input RockPaper or ...
7
votes
3answers
603 views

Rock Paper Scissor Code

Here is the code. Works great! Any advice would be great! Also, try it BEFORE reading the code. See if it is good. I've only found 1 "exploit" that can be use to beat the computer everytime and it is ...
7
votes
3answers
3k views

Let's play Rock, Paper, Scissors

I have written my first rock, paper, scissors project recently. I had to use a lot of if statements and System.out.println(); commands in the program. I am wondering what ways I could optimize my ...
7
votes
3answers
266 views

Rock Paper Scissors coding challenge

I did a job application to a Unity developer position and i was given a coding challenge which was implementing a Rock Paper Scissors game or a variation of it. I have implemented the game using Unity ...
7
votes
2answers
1k views

Rock Paper Scissors game in Python

I'm new to programming and I'm trying to teach myself Python through some online books. One of the exercises has me making a Rock Paper Scissors game. The one I have written works well enough I think,...
7
votes
1answer
621 views

Trying to grasp OOP Rock, Paper, Scissors program

I'm trying to wrap my head around OOP but so far I feel like I'm just moving functions into classes and calling them methods. I am trying to create a "Rock Paper Scissors" game using OOP best ...
7
votes
3answers
276 views

Directly accessing class attributes in Rock Paper Scissors

I am reading a beginning Python programming book and in it the author says that you want to avoid accessing a class' attributes directly, but instead to create methods that return attribute values. ...
7
votes
2answers
2k views

Rock-Paper-Scissors game with OOP concepts

This is code for a Rock-Paper-Scissors game I made using some of the OOP concepts I learned in C#. I don't know if I am making the right choices but I am fairly confident. It would be great if I could ...
7
votes
1answer
407 views

First attempt at writing Rock Paper Scissors game

I made this Rock Paper Scissors game and I would like for this to be critiqued. ...
6
votes
2answers
1k views

Is there a way to make my Rock, Paper, Scissors game more concise?

I am learning JavaScript and I just wrote a Rock, Paper, Scissors game that will first prompt the two players for their choices and validate them. In the event of a tie, each player will choose their ...
6
votes
3answers
1k views

Rock Paper Scissors with scores and save file

I've implemented the classic game Rock Paper Scissors with scores, and a save file implementation. I'm looking particularly for ways to get rid of all the self.'s. ...
6
votes
2answers
4k views

Rock, Paper, Scissors 3-part

Write a program that lets a user play "Rock, Paper, Scissors" against the computer. The program should ask the user to choose one of the three choices, and then the computer randomly picks one (...