473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 2378
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.