Arrays- Cannot get card game to display a straight or full house

Been trying to get this card game to tell the user if he/she's card hand contains a straight or a full house. Please e-mail me ASAP at [email protected] if you have an answer or idea. Thanks
This is what i have so far:
public void aStraight(Card[] hand)
boolean haveAStraight = false;
for(int i=0;i < hand.length;i++)
for(int j=i+1;j < hand.length;j++)
{  if(hand[i].getFace().equals(hand[j].getFace()))
haveAStraight = true;
else
haveAStraight = false;
i=5;j=5;
if(haveAStraight)
System.out.println("Your hand contains a Straight!!!");
public void fullHouse(Card[] hand)
boolean haveFullHouse = false;
for(int i = 0; i < 2; i++)
for(int j = i+1; j < 3; j++)
if(hand.getFace().equals(hand[j].getFace()))
haveFullHouse = true;
else{
haveFullHouse = false;
i=2;j=3;
if(haveFullHouse)
System.out.println("Your hand contains a Full House!!!");

Don't crosspost!
Please answer in the other thread, because the other thread has slightly better formatting:
http://forum.java.sun.com/thread.jspa?threadID=689861

Similar Messages

  • After updating iPod to iOS 5.0, cannot get into Game Center with previous nickname. It says my nickname is already in use by another account.  Why did this happen and how can I fix this with my old nickname and its data?

    After updating iPod Touch to iOs 5.0, I cannot get into Game Center with previous nickname.  The screen says my nickname is already in use by another account.  Why did this happen and how can I fix this so I can still use the same nickname?

    Did you haveany problem with updating to iOS 5? It soundsl like the update did not correctly restore from the backup that iTunes mnakes as the fisr step of the update.

  • HT1349 I cannot get onto games centre it keeps telling me email address is taken no matter how obscure the address I pick

    I cannot get onto games centre keeps telling me nickname is already assigned to email ?.. Any clues to how to get passed this?

    You need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (94157)

  • Cannot get Month and Year display off screen

    In Iphoto 6 I have photos that I imported. I cannot get the middle dark oval in the center of the screen to stop displaying on the photos.
    It makes it very difficult to edit the photos when I cannot see the center of the photo.
    How do I stop the display of the month and date

    In iPhoto Preferences, Appearance, uncheck "Show scrolling information."

  • Cannot get Excel Report to display on Internet Explorer

    Hi,
    We have an issue with displaying Excel reports on IE on some client machines. A window just pops up and closes. The reports run fine on Firefox and I was able to run it on IE earlier. I had this report working before on all application servers. Now I cannot get output on browser from dev. and test app servers after a small fix in the report. But I can still run the production version.
    Note that I can get the Excel output when I use 'getjobid' from an url :
    http://server:port/reports/rwservlet/getjobid1887?server=xxx&mimetype=application/vnd.ms-excel
    This is the code to output the report:
    SHOWDOCINFO :='/reports/rwservlet/getjobid'||JOBID||'?server='||REPORTSERVER||'&mimetype=application/vnd.ms-excel';
    The funny thing is my colleague can run the report on his pc without any problem. Is there some issue with the browser setting ?

    Yes. I use WEB.SHOW_DOCUMENT in the calling form. The window that pops up is an IE window. Yes we both use IE 7.0.
    I noticed today that if I uncheck the 'always ask before opening this type of file' on the File Download window, I can get it to work. How do I change this setting?

  • I cannot get pogo games to load

    I need help getting pogo games to load. I am allowing pop ups but the game rooms still will not load.
    I have the latest Java updates and Apple updates on my mac.

    Go to Applications > Utilities > Java Preferences
    1) Click the "Enable applet plug-in and Web Start applications" box
    2) Click the "Advanced" tab and click the "Hide Console" box (Turns on the Java console without display it)
    For future reference, these forums have a powerful search function.  I found the answer by searching Pogo Java.  You could have done the same.  Second, this is a forum for the MacBook Pro Hardware.  Please place future questions in the appropriate forum.

  • I cannot get pogo games to work

    i am having trouble getting pogo game to work, i have downloaded jave and have the browser enabled, but still no luck. any ideas?

    On my MAC book pro (early 2008) pogo.com works. But sometimes it just hangs. What I feel is when you open different sites on pogo, dont minimize them. Keep them in back ground. Sound weird, but that way minimum I can play my High Stake Pool

  • Cannot get certain applications to display via projector

    I was trying to display a movie on YouTube to my class (MacBook Pro connected to LCD projector), but Safari would not display, nor would QuickTIme Player. Understand: I  DO get my screen to display, but only certain applications will display via projector. In fact, I was able to get the YouTube movie to display on the projector by inserting it into a PowerPoint slide, as PowerPoint can be displayed.
    How do I solve this problem in the future?

    Hi b,
    Always best to start with basics. Is the projector turned on? Have you tried different input options on the projector (usually on a menu accessed with a button called Source or Input)?

  • Cannot get APEX_ITEM.POPUP_FROM_LOV to display correct values

    Hello.
    I am using APEX 2.2.x. I created a report region in which the underlying report query looks like:
    SELECT
    APEX_ITEM.HIDDEN(1,X.TN_ID),
    APEX_ITEM.HIDDEN(2,X.PHONE_ID),
    APEX_ITEM.HIDDEN(3,X.KEY_ID),
    APEX_ITEM.CHECKBOX(4,NULL) AS REMOVE,
    APEX_ITEM.TEXT(5,X.KEY) AS KEY,
    APEX_ITEM.POPUP_FROM_LOV(6,PHONE_ID,'DN') AS DN
    FROM
    MY_TABLE X
    WHERE
    X.TN_ID = :P10_TN_ID
    Here, the LOV 'DN' is defined as:
    SELECT PHONE_NUMBER, PHONE_ID FROM PHONE_NUMBERS
    ORDER BY 1
    This report renders correctly. After setting my three ID columns from the query
    to "No Show", the results display as 3 columns:
    Remove Key Dn
    "Remove" is a checkbox, "Key" is a simple input text field, and "Dn" is a popup
    field.
    My problem is that, when the selecting from the "Dn" popup, I get the "phone_id" value instead of the "phone_number".
    Does anyone know why this is happening?
    Thank you.
    Elie

    Thanks, Scott.
    I'm facing a deadline at work, and so, am burning the midnight oil to get my APEX project done. I'll try to post my issue on apex.oracle.com - just can't right now.
    I'm going to try a different tack.
    The problem I reported in this post stems from my using the APEX_ITEM API to
    create text items, checkboxes, and a single popup field in a report region.
    However, what I'm ultimately trying to accomplish is a form (not a report) in which users can edit multiple rows and then submit their multiple row edits
    with one click of the APPLY button.
    So, you might be thinking, why did I not just create a form based on a table.
    The reason is that I did not have a table to work with. I needed to have a
    form in which EXACTLY 10 rows (no more, no less) appear. Of these,
    there might be up 10 rows that actually have data whereas the remaining
    rows consist of all NULL columns.
    And so, I created a "pivot" table function that generates "missing rows".
    This works fine in a report query. But I could not find a way to use this
    pivot table function as part of an Oracle view against which I could point
    the APEX "Create Form On Table/View" option. This is why I tried to
    create a report region rather than a form and then use the APEX_ITEM API
    to create the text, checkbox, and popup fields I mentioned above. It's just
    the popup field that's giving me all the trouble.
    I'm going to try to create a different method of generating "missing rows" so as
    to get an Oracle view that consists of exactly 10 rows (of which up to 10 have
    actual data and the remaining rows consist of all NULL columns). I'll then make
    a view out this (as mentioned, I was unable to create this view using the pivot
    table function) and then try to create a form via APEX. Hopefully, this will
    eliminate the popup problem I'm having.
    Thanks very much for your help.
    Elie

  • Cannot get my 30" cinema display to come on after power outage

    I have a 30" cinema display running with my 2010 mac pro...all was fine, then we had a power outage last night. When I started the computer the next morning, computer came on but no monitor. So I took the display to apple store and they started on a mac book pro , no problem. When I went home and hooked everything back up to my mac pro, the 30" display will not work but a 20" cinema display I have did. Very confusing
    Please help if anyone can
    thanks

    The 30" cinema display has a cable that accepts inputs from its custom power brick, a Dual-Link DVI, a USB-2, and a FireWire-400.
    For a Silver Tower Mac Pro, you must connect the power and Dual-Link DVI.
    USB is needed by the display (for Brightness and possibly other controls from the Mac), and to run the convenience USB ports if desired.
    NB> Keyboards connected through the USB hub on the display cannot generate "snag key" codes early enough to be used at Startup. If you need to Option-Boot, you will need to plug your keyboard directly into a USB on the chassis.
    You need not connect FireWire unless you wish to use the hub and convenience ports on the display. It may require a FireWire 800 to 400 cable or adapter. (The adapter is good to place permanently, and its length (short) is good. For any other use, these adapters seem to "grow legs and walk away", so an adapter cable is superior.

  • Cannot get onto games in pogo

    When is Firefox going to fix the problem re getting onto pogo games?

    Oracle's released update 7u11 which fixes the exploit.

  • I installed Firefox 5 on a new computer and transferred my bookmarks from my old one. I cannot get my bookmark folders displayed on the bookmark toolbar. How do I add them to the toolbar? I can see the bookmarks have been downloaded.

    I tried to follow the help directions and do not see Mozilla at the top of the page as directed in the help instructions.

    You're welcome.
    Please click the '''Solved It''' button next to the answer that solved your Firefox support issue, '''''it appears when you are logged in''''', so this thread gets marked as '''Solved''' to help other users who may have this same problem.

  • When setting up my igoogle page, I cannot get the themes to display and when I select one, it won't show up on the igoogle page so can you assist me?

    I have used IE and Chome and both I get my igoogle page with the theme I have selected. I use to get Firefox with my theme on it. Then it changed and I could not. I contacted you, I went per instructions and deleted cookies, cache etc. and followed directions. Something I did worked. Now it is gone again. I followed some other question answers and put setup for Firefox 4.0.1 and then deleted Mozilla and then re-installed. That did not work. Now I am reading about Avast Webrep and all these other brainy people's answers which worked for them but I don't even know where to find these and I have not Firefox button or ability to go to extensions. I am so tired of this that I went back, downloaded IE 9 and Google Chrome. I got the theme on both again, even though I had completely uninstalled them as I was going to be a Mozilla person. Well now I just don't know and it has happened twice and I don't know how I fixed it to begin with.

    I suggest you to upgrade Firefox to version 7 and post back to us
    * getfirefox.com

  • How do I get facebook games to display correctly?

    While using Firefox the bottom of screen is cut off. I have updated Flash, Firefox and windows 7, tried all the options, help forums, FAQ's with no
    luck, can anyone help, please!

    The DW built in scripting will do that, those specific to the DW generated scripts are  not an issue.
    The missing end tags are a big issue though. None of your links in your menu have an end tag </a>, you are also missing a few </li>, that causes the rest of your page to basically become a link since the browser doesn't understand what you're trying to do. That is not part of any pre-made template I've ever seen in DW.
    You also have <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> at the beginning of your page, that needs to go completely. That gets added when you accidentally choose "ASP Javascript" when creating a new page rather than "HTML".
    There is a meta tag outside the <head> area of your code, that needds to be moved between your head tags. You also forgot to self close the keywords and description meta by using /> instead of > (not a major issue, but due to doctype, should be fixed)
    Because you're missing an ending </p> tag at about line 287 you'll get errors involving a lot of the remaining tags saying something to the effect of "canot go here, missing object..."

  • Cannot get my website to display properly on Iphone...what gives?

    This mild annoyance has now become a huge problem lately.  My supporting pages on my website do render properly on the browsers in my iphone.  The background repeats itself and when I add the "no-repeat" code, one side of the screen is gray.
    Also, my "ol" is not lining up properly with the image.  I've checked the website on Chrome, Firefox, Safari and Internet Explorer on Desktops and everything is uniform, however, on my mobile phone, I am experiencing these render issues.  I have attached a screen shot of how one of my pages looks on my iphone and have also provided a link to show how it usually looks (provided it is being viewed from a desktop).
    Any assistance would be greatly appreciated.  Thanks so much!
    www.tricksmovie.com/Buy_Now.html - (viewed in browser on Desktop)
    The image below is how it is showing up on my iphone under Chrome and Safari (with the "no-repeat" code added)
    FYI: I also talked to a friend of mine who has a Samsung Galaxy 3 and he says it displays on his phone normally, the way it displays on desktops.

    Thank you so much Bregent!  I was corrected my "ol" and it fixed the layout
    error.  The  remaing 12 errors are coming from my email code that came from
    Icontact.  I'm not quite sure what I can do about that.
    I'm still trying to determine why the background photo is cutting off on my
    iphone and what I can do to resolve it.

Maybe you are looking for

  • Video card failure on iMac (aluminum) - Excellent Apple Support

    My iMac (aluminum) 20" (2.4 GHz, 2GB RAM, 500GB HDD) greeted me with a grey / black screen this morning, a reboot resorted in the screen flashing as if the back light was going as it booted up along with static / noise lines and dashes then the scree

  • Issue with the sender file interfaces when using UTF-8 files

    Hello experts,      We are having number of File to SAP interface scenarios in our business process. In the past, we are having the files coming to us in ASCII text format. Recently, because of the business process change(to handle multiple languages

  • Lion server migration from 10.6 wiki dead, mail dead, ical dead

    i have a mac mini w leopard server- everything worked perfect i upgrade and migrated to lion server nothing working, wiki, mail, or icalendar any ideas- other than going back to restore of timemachine of leopard server thanx CT

  • My address book in v. 32.0 will not sort properly e.g. by first, last, etc.; how can I correct this?

    My address book has 106 names. I have selected for an ascending-sort by display name. But it will not fully sort that way; instead, the names appear as batches, within each of which the sort is (mostly) correct. When I click on Name at the top, the s

  • IPad 3 IOS8.x issues

    I Have been having issues with the ios8.x update. After the initial update I started having things like the button that ret urn you to home taking several pushes. also links text icons taking several pushes too. That was tolerabl, then 8.1 came out.