Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
rock
- Page 1
Rock Paper Scissors name input
Programming
Software Development
13 Years Ago
by jarograv
… RPS */ public class RPSPlayer { private int playerThrow; //
ROCK
= 1, PAPER = 2, SCISSORS = 3 /**…if (playerThrow == PAPER && compThrow ==
ROCK
) { System.out.println("You win!"); …
Rock-Paper-Scissors, C++ program. Need Help!!!
Programming
Software Development
13 Years Ago
by br0wnm4n
…': case 'p': object = Paper; break; case 'R': case 'r': object =
Rock
; break; case 'S': case 's': object = Scissors; } return object; }; bool… false; } } void convertEnum(RPS object){ switch (object) { case
Rock
: cout << "
Rock
"; break; case Paper: cout << "…
rock paper scissors game not working
Programming
Software Development
17 Years Ago
by Spencicle
…second; char paper = 'p'; char paperP = 'P'; char
rock
= 'r'; char rockR = 'R'; char scissors = 's';…second=paper; break; case 'r': case 'R': second=
rock
; break; case 's': case 'S': second=scissors; …=paper) && (second=paper) || (first=
rock
) && (second=
rock
) || (first=scissors) && (second=scissors))…
Re: Rock-Paper-Scissors, C++ program. Need Help!!!
Programming
Software Development
13 Years Ago
by br0wnm4n
…Please enter your choice: R You selected
ROCK
and Computer selected SCISSORS . You won this…want a Game Log ? Y Game # 1
ROCK
vs SCISSORS You won! Game # 2 PAPER…. Game # 7
ROCK
vs
ROCK
tie game, no one won. Game # 8
ROCK
vs
ROCK
tie game, no…
Re: Rock, Paper, Scissor Game Help
Programming
Software Development
15 Years Ago
by EGutierrez91
…s play to a string.*/ // **************************************************************** //
Rock
.java // // Play
Rock
, Paper, Scissors with the user // // ****************************************************************…java.util.Scanner; import java.util.Random; public class
Rock
{ public static void main(String[] args) { …
Rock Paper Scissors JApplet - Making Images appear and disappear
Programming
Software Development
13 Years Ago
by RaigaX9
…add(file); setJMenuBar(menuBar); //loadImage(); rockButton = new JButton("
Rock
"); scissorsButton = new JButton("Scissors"); paperButton = new…if(computerValue == 0) { g.drawString("Computer's Pick:
Rock
", 350, 170); /*comLabel.setVisible(true); comLabel2.setVisible(false);…
Rock Paper Scissors Code Help Lot's of Detail
Programming
Software Development
13 Years Ago
by SketchGamer
… static int Paper=3; static int Scissors=9; static boolean
rock
,paper,scissors; public static void main(String args[]) { //set… case 'R': case 'r': Userinput[y]=
Rock
; System.out.println("You chose
Rock
!"); boolean
rock
=true;//an idea that i was…
Re: Rock Paper Scissors name input
Programming
Software Development
13 Years Ago
by jarograv
… 2005 */ import java.util.Scanner; /** * Computer plays
Rock
Paper Scissors against one player. */ public class RPS2 { public…(); i++) { System.out.print("Enter your throw (
ROCK
=1, PAPER=2, SCISSORS=3): "); playerThrow = input…
Re: Rock Paper Scissors name input
Programming
Software Development
13 Years Ago
by jarograv
… 2005 */ import java.util.Scanner; /** * Computer plays
Rock
Paper Scissors against one player. */ public class RPS2 { public…(); i++) { System.out.print("Enter your throw (
ROCK
=1, PAPER=2, SCISSORS=3): "); playerThrow = input…
Rock, Paper, Scissors game
Programming
Software Development
12 Years Ago
by babi.meloo
…++; } else { System.out.println("
Rock
=
Rock
. Tie!"); tie++; } if (comp…== 0) { System.out.println("
Rock
beats scissors. You lose!"); lose++;…
Rock Paper Scissors Game with GUI
Programming
Software Development
15 Years Ago
by manathisbest
…self.label = Label(root, text='"Choose
Rock
, Paper, or Scissors."', fg='Black',…= 3) self.button1 = Button(root, text='
Rock
', bg='Blue', fg='white', padx=10, pady…
Re: Rock Paper Scissors name input
Programming
Software Development
13 Years Ago
by Gravitics
… < numRounds(); i++) { System.out.print("Enter your throw (
ROCK
=1, PAPER=2, SCISSORS=3): "); playerThrow = input.nextInt(); rpsOpponent…
Rock Paper Scissors and how to break out
Programming
Software Development
15 Years Ago
by hughesadam_87
…paper' elif number < 20: output = 'scissors' else: output = '
rock
' print 'Computer draws', output return output def decision(self, rand_output…1 status = 'no' elif rand_output == 'scissors' and self.entry == '
rock
': print 'You Win' self.tries += 1 status = 'yes' else:…
Rock, Paper, Scissor Game Help
Programming
Software Development
15 Years Ago
by EGutierrez91
…s play to a string.*/ // **************************************************************** //
Rock
.java // // Play
Rock
, Paper, Scissors with the user // // …java.util.Scanner; import java.util.Random; public class
Rock
{ public static void main(String[] args) { …
Re: rock paper scissors game not working
Programming
Software Development
17 Years Ago
by vmanes
You need to use doubled equal sign for the equality comparison. As in: [code] if ((first==paper) && (second==
rock
)) [/code] What you have assigns paper to first (and evaluates as TRUE) and assigns
rock
as second (which also evaluates as TRUE), so your first test always runs.
Re: rock paper scissors game not working
Programming
Software Development
17 Years Ago
by gerard4143
[QUOTE=Spencicle;543039] if ((first=paper) && (second=
rock
)) [/QUOTE] should be if ((first==paper) && (second==
rock
))
Rock Papers & Scissors
Programming
Software Development
16 Years Ago
by mrrko
… basis for determining the winner: Paper covers
rock
,
Rock
break scissors, Scissors cut paper, or Nobody…player2 == ('S' || 's')) { cout << "
Rock
breaks scissors, Player 1 Wins\n"; } else if (player1…player2 == ('R' || 'r')) { cout << "
Rock
breaks scissors, Player 2 Wins\n"; } else if (player1…
Re: Rock Paper Scissors Code Help Lot's of Detail
Programming
Software Development
13 Years Ago
by SketchGamer
…{ Compinput[0]=1; System.out.println("My choice is
rock
"); } else if(randomStartVal==1) { Compinput[0]=3;… if(totalCompValue==21) { System.out.println("My selection is
Rock
"); } else { randomValue(); } } } public static void addToArray() {…
rock , paper , and scissors against the computer?
Programming
Software Development
11 Years Ago
by hihamda
… the program that lets the user play the game of
rock
, paper , and scissors against the computer? The program should work… . if the number is 1, then the computer has chosen
rock
. if the number is 2, then the computer has chosen… yet ). . -The user enters his or her choice of "
rock
", "paper", or "scissors" or quit…
Rock Paper Scissors fun-ction
Programming
Software Development
18 Years Ago
by kylcrow
… (userChoice == 'S')) { cout << "
Rock
smashes scissors. You Lose.\n"; computer += 1; … (userChoice == 'R')) { cout << "
Rock
smashes scissors. You Win.\n"; player += 1; }… (userChoice == 'S')) { cout << "
Rock
smashes scissors. You Lose.\n"; computer += 1; …
Rock Paper Scissors
Programming
Software Development
14 Years Ago
by Wootens
…if (computerPlay.equals("S")) System.out.println("
Rock
crushes scissors. You win!!"); else if (computerPlay.equals… (computerPlay.equals("R")) System.out.println ("
Rock
breaks scissors. You lose!!"); } //Chooses Computer Choice…
Re: Rock Paper Scissors Code Help Lot's of Detail
Programming
Software Development
13 Years Ago
by SketchGamer
…==15) { System.out.println("My selection is
Rock
"); int updateArray=1; addToArrayComp(); } else if(… if(totalCompValue==21) { System.out.println("My selection is
Rock
"); int updateArray=1; addToArrayComp(); } else { randomValue(); addToArrayComp…
Rock Paper Scissor Program
Programming
Software Development
13 Years Ago
by Sheepdawg
…return 0; } void programIntroduction(){ cout << "
ROCK
PAPER SCISSORS version 0.2 \n" << endl… << "\nYou picked Paper. The computer picked
Rock
. You won!" << endl; wins++; } else…cout << "\nYou picked Scissor. The computer picked
Rock
. You lost!" << endl; losses++; } else…
Re: Rock Paper Scissors Game with GUI
Programming
Software Development
15 Years Ago
by woooee
…] def player(self, choice, Com): win_d = { '
rock
':'Scissors', 'paper':'
Rock
', 'scissors':'paper'} if choice.lower() == Com.lower():… def cb_handler(self, event, button_num): button_dict = { 1:'
Rock
', 2:'Paper', 3:'Scissors' } if button_num in button_dict: …
Re: Rock Paper Scissors
Programming
Software Development
14 Years Ago
by Wootens
…if (computerPlay.equals("S")) System.out.println("
Rock
crushes scissors. You win!!"); else if (computerPlay.equals(&…if (computerPlay.equals("R")) System.out.println ("
Rock
breaks scissors. You lose!!"); } //Chooses Computer Choice …
Re: Rock Paper Scissors Code Help Lot's of Detail
Programming
Software Development
13 Years Ago
by SketchGamer
… value to go to array[0] each time i enter
Rock
Paper or Scissors. What is the best way to do…]..then array[3] will get replace by my next choice
rock
paper or scissors
Rock paper scissors using functions
Programming
Software Development
16 Years Ago
by evilsithgirl
… == 1) cout << "Paper beats
rock
! Sorry, you lose!\n\n\n\n"; else… if (compSelection == 2) cout << "
Rock
beats scissors! You win!\n\n\n\n"; }…compSelection == 1) cout << "Paper beats
rock
! You win!\n\n\n\n"; else if …
Rock/paper/scissors score display/tracker function.
Programming
Software Development
14 Years Ago
by stephenk291
…Class Contastant to simplify comparisons. static final String
ROCK
= "
Rock
"; static final String PAPER = "…random() * 3.0); String computerChoice; if (randomValue == 0) { computerChoice =
ROCK
; } else if (randomValue == 1) { computerChoice = PAPER; } else { …
Re: Rock Paper Scissors
Programming
Software Development
13 Years Ago
by ilovejava
… if (userPlay==3) userPlay=SCISSOR; if (computerPlay==1) computerPlay =
ROCK
; if (computerPlay==2) computerPlay =PAPER; if (computerPlay==3) computerPlay=…SCISSOR; if (computerPlay ==
ROCK
&& userPlay==SCISSOR ){ System.out.println("computer chose…
Re: Rock Paper Scissors Code Help Lot's of Detail
Programming
Software Development
13 Years Ago
by SketchGamer
What is an example of searching through an array for something. For example: if i wanted to search the array for a value of 1(
rock
) 3(paper) 9(scissors)?
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC