472,793 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,793 software developers and data experts.

Paper,Scissor,Rock Help

Please can anyone help me to make a simple simple Java code to force the game scissor,paper,rock to work ?

for example i know how to do it in Visual Basic but not in java,for example this is kind of what i want

Rock beats Scissor
Paper beats rock
Scissor beats paper

msgbox 'Enter your choce'
If txta.text = "Rock" then
lbldisplay.caption = "I choose paper,so i beat you"
elseif
txta.text = "Paper" then
lbldisplay.caption = "I choose rock,so you win"


etc etc etc thats all i want i just dont know how Java works pretty well yet,than you so much to all of u who at least watched the topic.
Feb 11 '08 #1
11 2347
r035198x
13,262 8TB
Please can anyone help me to make a simple simple Java code to force the game scissor,paper,rock to work ?

for example i know how to do it in Visual Basic but not in java,for example this is kind of what i want

Rock beats Scissor
Paper beats rock
Scissor beats paper

msgbox 'Enter your choce'
If txta.text = "Rock" then
lbldisplay.caption = "I choose paper,so i beat you"
elseif
txta.text = "Paper" then
lbldisplay.caption = "I choose rock,so you win"


etc etc etc thats all i want i just dont know how Java works pretty well yet,than you so much to all of u who at least watched the topic.
If you don't know any Java then you are better off reading a Java tutorial.
If you don't have time to go through the whole thing now, you can just browse to the specific topics you want.
Feb 11 '08 #2
If you don't know any Java then you are better off reading a Java tutorial.
If you don't have time to go through the whole thing now, you can just browse to the specific topics you want.
i did already but didnt found anything that looks like what i want,i've found large codes of the program,but thats not what im looking for though :(
Feb 11 '08 #3
r035198x
13,262 8TB
i did already but didnt found anything that looks like what i want,i've found large codes of the program,but thats not what im looking for though :(
Are you looking for the code or are you looking for guidance on how to write the code?
Feb 11 '08 #4
Are you looking for the code or are you looking for guidance on how to write the code?

yes sir................................
Feb 11 '08 #5
r035198x
13,262 8TB
yes sir................................
Yes what? Did you read my question?
Feb 11 '08 #6
Yes what? Did you read my question?
I'm looking for whatever you're able to help me,the code is fine if u are able to give it to me, if you dont want to just give me the code,then guide me how to do it please
Feb 11 '08 #7
BigDaddyLH
1,216 Expert 1GB
I like to use the bulldozer: three rocks in a row. Works ever time!
Feb 11 '08 #8
RedSon
5,000 Expert 4TB
I like to use the bulldozer: three rocks in a row. Works ever time!
That only works if the other person doesn't do paper twice in a row.
Feb 11 '08 #9
BigDaddyLH
1,216 Expert 1GB
That only works if the other person doesn't do paper twice in a row.
G*d d*mn that "Paperboy" move!
Feb 11 '08 #10
r035198x
13,262 8TB
I'm looking for whatever you're able to help me,the code is fine if u are able to give it to me, if you dont want to just give me the code,then guide me how to do it please
We don't give out boilerplate codes here. I have already guided you in the right direction.

P.S Rock
Feb 12 '08 #11
RedSon
5,000 Expert 4TB
P.S Rock
Dang I had scissors. Next try... PAPER! HA!
Feb 12 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Carlos Kirkconnell | last post by:
When printing, there is a definition for a Custom paper size, the custom paper size can be setted programatically and everything is supposed to work normally. But in windows 2000 and xp, the user...
5
by: Ira S | last post by:
I use a DYMO labelwriter with my Access 97 database. I just purchased a new computer and in the report section under page setup/paper size, the new computer keeps changing the size automatically. I...
7
by: TooNaive | last post by:
Hello all, I'm taking a C class and am having to write a program to play a game of rock, paper scissors, and with the output of: You chose paper and I chose rock. You Win where paper is the...
1
by: Vince | last post by:
Through VB6 I asm trying to print to the bottom bin with a paper type of LetterHead on an HP4200tn printer. After much messing around with my bin issue, I finally determined that if I keep the...
3
by: Panos | last post by:
Hi all, I am trying to print a report in A4 paper, but my printer's default paper is different (Letter 8.5 x 11 inches). So when i print, a significant part of the paper remains blank, because of...
6
by: Brewtzaff | last post by:
Hello, I have a little problem to print my reports on custom sized paper. I got a db containing clubmembers, a query which selects only the needed infos to print out my membershipcards. My...
3
by: pratik.best | last post by:
Hi, I am creating a software for a school. They are using dot matrix printer and have preprinted stationary. Now the paper size is 6 inches, and they are using tractor feed. How can I stop the...
1
by: flg22 | last post by:
Hi I am working on this Rock, paper, scissors java game and the program works, but I can not figure out how to get the images to load onto the program. So my question is how do I get the images to...
8
by: jmf777 | last post by:
Hi here is my problem I want to have the outcome of my rock paper scissors game to print outcomes like: You chose paper and I chose rock. You win. The value for player_choice and machine_choice is...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.