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
3answers
662 views

Rock-paper-scissors console implementation

How can I optimize this code? I want to use more C++11 features. game_control.h ...
2
votes
2answers
3k views

Simple rock-paper-scissors game

This is a simple rock-paper-scissors program implemented using C++. Any feedback or suggestions for improvement are welcome. Code: main.cpp: ...
4
votes
1answer
131 views

Rock-Paper-Scissors game in Clojure

I followed braveclojure book and built this little command line Rock, Paper, Scissors game. The game works fine, but I was wondering if there is a better / more ...
4
votes
2answers
2k views

Rock, Paper, Scissors in JavaScript

I'm learning javascript and want to make my code as efficient as possible. This is something I wrote a while back and I keep revising it as I learn new things. But since I'm partly OCD, I can't help ...
8
votes
3answers
6k 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 ...
4
votes
1answer
6k views

Rock Paper Scissors with score count

This is my Rock Paper Scissors code for Python 3 with score count. I want to make it more readable and concise if possible. ...
3
votes
2answers
209 views

Paper-scissors-stick-stone game in Python

I would like to condense the code under def game(). I was told through a response to my question on Stack Overflow that I could use dictionary which goes something ...
4
votes
2answers
139 views

Python Rock Paper Scissors sqlite

I posted some time ago an earlier version of this code and was told about some improvements that should be made. They were mostly about the sql-queries I was using and the DRY-principle. Even though ...
3
votes
1answer
169 views

Python 3 Rock, Paper, Scissors

I've some basic knowledge of Python 3 and I've been working on the following code for some time now. I've been starting playing around OOP and external modules as you can see from the code. Any tips ...
8
votes
3answers
343 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 ...
5
votes
3answers
782 views

Rock Paper Scissors in Python

I'm a beginner in Python and I've just finished a Rock, Paper, Scissors simulator in Python. It asks the user to enter paper, rock, or scissors and the program will generate a random number which will ...
18
votes
6answers
5k 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 ...
4
votes
2answers
503 views

A game of rock, paper, scissors made with ES2015

Please give me feedback on my code, on what you like and don't like. I tried to make use of ES2015 as much as I could. There is some jQuery in there as well. Any pro tips you can give me? Here is a ...
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, ...
7
votes
3answers
692 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 ...
3
votes
2answers
505 views

Rock, Paper Scissor game (console-based) in Python

I'm a beginner at coding with Python, and I've only made small projects, and this is one of them. One part of the code is from an answer on Stack Overflow that I made to solve a problem (is the try ...
9
votes
2answers
346 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 ...
2
votes
3answers
4k views

Rock, Paper, Scissors game in JavaScript

I built this as part of completing the Codecademy JavaScript lesson. I wanted to perfect it, make it readable and functional, and as efficient as possible. As far as I can tell it can't be any more ...
23
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 ...
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
885 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
19k 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
239 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
277 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
5k 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
852 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
890 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
269 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
143 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
336 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
693 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
57 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
253 views

Python rock paper scissors

My code implementing rock, paper and scissors in Python, using dicts to hold choices. ...
1
vote
1answer
174 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
2k 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
401 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
243 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. ...