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
3
votes
1answer
4k views

How do I make my Rock-Paper-Scissor program more JavaScript-like?

I have implemented my first program in JavaScript, Rock-Paper-Scissors. I would like JavaScript developers to help me make this program more JavaScript-like by following the idioms of the language. I ...
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 ...
8
votes
3answers
188 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 ...
12
votes
3answers
475 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 ...
7
votes
3answers
418 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 ...
12
votes
1answer
161 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
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 ...
3
votes
1answer
11k views

Use if/else/elif conditionals to write a basic Rock Paper Scissors game

I have the following code for the Rock, Paper, Scissor game. The code works fine in Python 2.7. Are there other more concise, more readable, or more pythonic ways of solving this problem in Python? <...
12
votes
6answers
17k 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." ...
2
votes
2answers
3k views

OOP in Rock, Paper, Scissors program

This is an OOP Rock, Paper, Scissors program I wrote in Python. I am just learning about using classes and I'd appreciate some advice on improving it. ...
18
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 ...
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 ...
7
votes
3answers
280 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. ...
3
votes
3answers
360 views

Making my Rock, Paper, Scissors game shorter

I am looking for advice on making the following code shorter. Any help is appreciated. ...
4
votes
2answers
1k views

Rock-Paper-Scissors in procedural and object-oriented

I am comfortable with the procedural style, and learning the object oriented, so I have done a small Rock Paper Scissors game in both styles. This script is in procedural style and this one is in ...
7
votes
1answer
413 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. ...
7
votes
1answer
715 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 ...
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 ...
7
votes
4answers
914 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 ...
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 ...
4
votes
4answers
2k views

Rock paper scissors

I've started learning Python recently and I wanted to test myself. So, can you tell me how many I would get out of 10 and how I could improve my future coding? ...
11
votes
2answers
964 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 ...
4
votes
2answers
11k views

Rock-Paper-Scissors game

This is the first piece of code I wrote on my own. I tried to use everything I know, like functions, loops and variables. Is it good or could it be simpler? Please be hard as you can be with me ...
4
votes
3answers
11k views

Rock, Paper, Scissors game assignment

This is an assignment that I have already turned in. It works great, but I was wondering if there are any flaws in the code, or how to write it in a more pythonic way. ...
2
votes
2answers
5k views

Rock, Paper, Scissors game

I am very new to Ruby and building my first game. To be honest I did it this way because I was lazy to type so much. My friend told me that the correct way was to do this with case statement i.e. for ...
5
votes
1answer
5k views

Rock, Paper, Scissors in Python

I was eventually going to add another computer and more options to this (i.e., Rock-paper-scissors-lizard-Spock) but I wanted to make sure I was using the best practice for this type of game. Any help ...
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: ...

1 2 3