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
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# ...
12
votes
2answers
829 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 ...
2
votes
1answer
1k views

Rock Paper Scissors JavaScript game

I'm sure this game gets put up here all the time but I'd appreciate it if you could have a look over my code and give me some suggestions on how to improve it. Here is a live example so you can play ...
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. ...
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. ...
1
vote
1answer
14k views

Rock Paper Scissors C++ Game

I just started to learn C++ and I decided to make a Rock Paper Scissors game. It works fine but I would like to know how can I improve it further. In particular I couldn't find an efficient way to ...
5
votes
1answer
218 views

Rock-Paper-Scissors with the revealing module pattern

In my ongoing effort in learning advanced JavaScript I tried to develop the traditional rock paper scissors game by using the famous revealing module pattern. I'm not comfortable yet with what has to ...
4
votes
1answer
268 views

Simple Rock Paper Scissors in Erlang

I'm very new to Erlang and I'm specifically interested in making my Erlang idiomatic (in other words, can you tell I don't know Erlang from this code?) and removing code duplication. I am not as ...
7
votes
3answers
4k 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 ...
8
votes
2answers
834 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. ...
3
votes
2answers
753 views

Beginner code for a Rock, Paper, Scissors game in Python

I am a beginner in Python and I wanted to see if I could get some feedback on my simple Rock, Paper, Scissors game. I do have previous experience in programming, as I started learning a few years ago ...
2
votes
1answer
244 views

Rock-Paper-Scissors (etc) with encapsulated business logic

Overview The following is an attempt at a Rock-Paper-Scissors (etc) game that has its business logic encapsulated in a rules engine. For the purposes of this exercise, I kept all of the business ...
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 ...
5
votes
3answers
3k views

Object-oriented rock-paper-scissors game

This is my code for a simple rock-paper-scissors game. Users have the choice between playing against a computer or watching a "computer player" play another "computer player". The code for the ...
3
votes
2answers
138 views

Simple Rock-Paper-Scissors to get more comfortable with OOP

I'm trying to get a little more comfortable with using classes as they're meant to be used, instead of using them to decorate my code to make it look more legitimate. Can you see anything glaringly ...
4
votes
1answer
323 views

Simple Rock Paper Scissors Game

Note: This code was first posted on another forum by me under the name Candy. Read this note before you declare this code copied. Since I was bored, I decided to code a Rock Paper Scissors game in ...
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? ...
2
votes
1answer
669 views

Another Rock Paper Scissors in plain JavaScript

Outside of the jQuery DSL I've hardly ever written any JavaScript. I never bothered learning JavaScript until a couple of months ago. After a slow start I got stuck in and created this game today. I ...
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 ...
2
votes
2answers
55 views

OOP, FP and IMP condensed in Rock, Paper and Scissors

Rock Paper and Scissors is a pretty basic program. The reason I wrote this program is because I wanted to see what a small script that used all of the main programming paradigms looked like. My code ...
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. ...
6
votes
2answers
240 views

Python rock paper scissors

My code implementing rock, paper and scissors in Python, using dicts to hold choices. ...
1
vote
1answer
138 views

RockPaperScissorsV2 follow-up Advanced

I have posted my first version of RockPaperScissors a while back. It was on an old version of python with improper use of some functions. This version was updated to a more recent version of python ...
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. ...
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. ...
1
vote
4answers
2k views

Java Rock/Paper/Scissors Game

For my computer science class I am tasked with writing a rock/paper/scissors game. I understand how to write the game, but I was wondering if someone more experienced than I could give me some ...
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 (...
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,...
6
votes
2answers
364 views

Rock, Paper, Scissors, Lizard and Spock with OOP

Today I saw an extremely interesting question on the Rock, Paper, Scissors, Lizard and Spock game. I've decided to take my swing at it and I've written the following OOP implementation: ...
3
votes
1answer
233 views

Rock, Paper, Scissors, Lizard and Spock - Relational Paradigm

I found a few question about the game and IMHO it's a relational problem and better addressed by set logic. Thus I created this solution in SQL to get away from ugly JavaScript, elegant java and ...
-1
votes
1answer
3k views

Console-based Rock-Paper-Scissors game

I just began my C# debut and was just wondering if this Rock-Paper-Scissor console app is good and flexible. ...
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 ...
4
votes
1answer
216 views

Interactive Rock Paper Scissors

I am a beginner in programming and this is the third program I've written. This is an interactive game of rock, paper, scissors, capable of being modified to any number of turns. I would love to see ...
2
votes
2answers
254 views

Python Command Line Rock Paper Scissors

I'm looking for tips on how to clean up this code and/or make it more efficient. Keep in mind I am a seriously new programmer and if it is too advanced it's likely to go over my head. ...
23
votes
4answers
4k 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 ...
5
votes
2answers
873 views

Rock Paper Scissors game

This is a very simple rock paper scissors game implemented in Haskell. ...
3
votes
3answers
219 views

RockPaperScissor in Python

This is a simple Rock - Paper - Scissor game. I'm trying to find a better way to write the algorithm and keeping the scoreboard. ...
5
votes
3answers
6k views

Simplification and efficiency suggestions for “Rock, Paper, Scissors” game

I wrote this program for an exercise in Bjarne Stroustrup's text Programming -- Principles and Practice Using C++. He recommended using a vector for pseudo ...
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
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 ...
15
votes
1answer
686 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 ...
2
votes
1answer
460 views

My first RSpec test - Rock Paper Scissors

I'm relatively familiar to Ruby, but I'm brand-new to testing code. I've decided to use RSpec because as it seems like a popular option. The game works perfectly, but the spec has a lot of repetition ...
10
votes
2answers
215 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. ...
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 ...
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
187 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
470 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
412 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 ...