This rummy game is driving me nuts, Please Help me!!!!

In my project, I am suppose to create an agent that plays a simple version of rummy. To win this game, the agent is dealt seven cards initially, and in order to win, it has to create two sets of combination of cards (one of 3 cards the other of 4), each combination can either have cards of the same rank (eg. 10 Hearts, 10 Clubs, 10 Spades) or the same sequence, but the same suit (2s,3s,4s,5s OR 7c,8c,9c). The cards are saved in an array of seven elements.
Beside the main SDK, we have our own api for this game, that for example lets you check whether two cards are in the same rank (eg. (10H.sameRank(10D) returns true), or whether they have the same suit or not.
I have no trouble creating a hand of cards with the same rank, but my problem is with creating a hand of cards with the same sequence.
I have tried to come up with an algorithm that would allow me to create a hand of cards (of same suit) in the sequence, but without success. This thing is driving me nuts.
CAN ANYONE GIVE ME ANY GUIDANCE PLEASE!!
Thanks

http://forum.java.sun.com/thread.jsp?forum=406&thread=354616

Similar Messages

  • Order of tunes in library when importing is driving me nuts please help me!

    Can somebody PLEASE help me....when I import albums into the library/ playlists it stores all the first tracks, then all the 2nd tracks, then all the 3rd tracks, and so on....like 1 1 1 1 2 2 2 2 3 3 3 3 and so on, down the list, and plays them in that order too. Extemeley annoying...can anyone help me rectify this problem?

    click on the column header that you want to sort by (artist/album/track#/song title etc)

  • MacXs is driving me nuts,  Please help!

    Please guide me to proper instructions on how to eliminate MacXs from my iMac Intel.
    I attempted to download something and ended up with this MacXs adware on my Safari (V 7.0.6 (9537.78.2), Firefox (V 31.0) and Chrome (V 37.0.2062.94).
    When I search for removal instructions I get a huge list of totally unfamiliar sites... Don't want to go there.
    Thanks much,
    Fred

    You may have installed the "VidX" trojan, perhaps under a different name. To remove it, first open the Applications folder by selecting
              Go ▹ Applications
    from the Finder menu bar, or by pressing the key combination shift-command-A. Look for an item named "VidX," "MacVx," or similar. If present, drag it to the Trash and empty.
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extension you don't know you need. If in doubt, remove all of them. You may well have more than one that's adware or spyware.

  • New to this iPOD game, and having problems! Please help!

    So I finally got my hands on a Nano yesterday, and ever since then some odd things have been happening. I would appreciate any help to the following questions/problems I've been having, because the applecare stuff does not seem to really be either helping or addressing my issues.
    1. When starting iTunes, I was told (once it reconized my nano) that I neeed to install the new software for the nano, i expected this and downloaded it, and followed the directions. As soon as I did that though I started getting "Corrupted Error" messages in iTunes. To get this to stop I just reinstalled iTunes...I was able to transfer things now, but now the system does not seem to reconize that the nano has the new software, and asks if I want to install it, and when I do...(again) I start getting those corrupt errors again.
    2. I will move some songs from my iTunes library, to my nano, and it says they transfer over. I then eject my nano from iTunes, wait for the "do not disconnect" to go away, and unplug it, and sometimes, my newly transfered songs are no longer on my nano. Am I doing something wrong?
    3. I went to update my iPod with some playlists from my library, I went to the options, and said "only update from these lists" It updated my ipod...and deleted everything else off of it, and to add insult to injury, it only added the title of the play list, and NOT the actual song files
    I know this is a lot, but I'm really frustrated, so any help would be appreciated.
    Thank you so much for your time.

    Hi,
    Read this link if it happens again: iPod: What to do if Windows displays an "itunes.exe - Corrupt File" message
    There is another post I think it is in the User Tips Library that goes into more detail as well.
    Regards
    Colin R.

  • This Mail quirk is driving me batty, please help

    Aloha all (iPhone 3GS v 3.1.2 16gb latest updates installed, no jailbreak) now that that's out of the way here's the issue.
    On home screen amount of messages shows up in Mail. When I open Mail, the amount of messages are still there, however in mail from @me.com as soon as I open the mail all messages disappear. With the other account, my home account through Cox Cable the numbers stay and the correct number of messages show up when I open. Only in the .Mac account do the mail messages disappear. Any thoughts or ideas on this one? I usually have to wait until I get to a computer to log in to .Mac and read the mail. This has basically become a pain in the posterior. Sometimes there is mail in the correct amount, and sometimes there's not. I want .Mac to work badly, but there are becoming so many little issues I'm about ready to cut it loose. I have been very patient, over 3 years, but I've about had it with so many other free apps that do the same stuff, From the slowest backups, unusable iDisk speeds, sorry didn't mean to rant, just want a way for my mail to work properly. Mahalo for any tips, info, suggestions. JB

    If this is a former .Mac account, are you accessing the account as an IMAP or POP account with the email client on your computer used for accessing the account?
    If you are accessing the account as a POP account with an email client on your computer, this can cause problems when accessing the account as an IMAP account with another email client.

  • Commands driving me NUTS - please help

    Got this to work - but ONLY with numbers. I need to be able
    to insert text -
    How/what am I doing wrong????
    I CANNOT find any adobe help (detailed) on how to write
    proper commands - am
    I blind?
    Helle - WithLotsOfGreyHairNow
    <%
    If (Request.Form("Kategori")="") Then
    Response.Redirect "Pro_Kat_Pick.asp"
    end if
    %>
    <%
    If (Request.Form("Kategori") <> "") Then
    set ComInsertKat = Server.CreateObject("ADODB.Command")
    ComInsertKat.ActiveConnection = MM_connHK_STRING
    ComInsertKat.CommandText = "INSERT INTO T_Kategori (Kategori)
    VALUES (" &
    Request.Form("Kategori") & ")"
    ComInsertKat.Execute()
    Response.Redirect("Pro_Kat_Pick.asp")
    end if
    %>

    Helle wrote:
    > Got this to work - but ONLY with numbers. I need to be
    able to insert
    > text - How/what am I doing wrong????
    > I CANNOT find any adobe help (detailed) on how to write
    proper commands
    > - am I blind?
    >
    >
    > Helle - WithLotsOfGreyHairNow
    >
    >
    > <%
    > If (Request.Form("Kategori")="") Then
    > Response.Redirect "Pro_Kat_Pick.asp"
    > end if
    > %>
    > <%
    > If (Request.Form("Kategori") <> "") Then
    > set ComInsertKat = Server.CreateObject("ADODB.Command")
    > ComInsertKat.ActiveConnection = MM_connHK_STRING
    > ComInsertKat.CommandText = "INSERT INTO T_Kategori
    (Kategori) VALUES ("
    > & Request.Form("Kategori") & ")"
    > ComInsertKat.Execute()
    > Response.Redirect("Pro_Kat_Pick.asp")
    > end if
    > %>
    Dreamweaver CS3 has issues with Commands, whenever I try to
    use them it
    crashes. The way I got around it was to use stored
    procedures, and then
    use a Recordset to pass the details to it. Works perfectly.
    Steve

  • AHHH!!! Printer driving me nuts, please help!

    I have a IMac running OS10.4.10, and a Brother laser printer. They all previously worked perfectly until recently. Can not remember what I changed at all, except for installing an component to Quick Time to play Windows media player files.
    1. Printer does work as I can print direct with USB using my Macbook.
    2. When using word or excel to print. Nothing happens, the files does not even reach the print queue.
    3. When using Keynote, or Pages to print, it says 'Error while printing'.
    4. The computer crashes at times when attempint to print.
    Tried
    1. reinstalling printers.
    2. using an old Canon printer - same responses
    3. 'Reset Printing System' - same results
    4. head bashing - it hurt my head.
    Could anyone help me, and perhaps point me in the right direction as I am pulling my hair out.
    Thank you very much.
    CL

    The two steps that come to mind are
    (1) Reinstall the applications that don't work.
    If that does not work.
    (2) Reinstall Mac OS X, using the Archive and Install option to get a fresh System. This lets you elect to retain your user data, but you should still backup your personal data, just in case. Also, after starting up from the Mac OS X Installation Disk, run Disk Utility from the Installer menu. Use both the Repair and Repair Permissions routines.

  • Hi,earlier i was able to download free games on my ipad2,but now every timr i am trying it is asking for billing information?and even after selecting "NONE" option i am not able to download free games on my ipad?please help me if u have solution.thanx

    Hi ,Earlier i was able to download free games on my ipad2,but now everytime i am trying it is asking for billing information?
    even after selecting "none" option  i am not able to download free games on my ipad ?
    please help me if u have solution for this

    khalid08 wrote:
    Hi ,Earlier i was able to download free games on my ipad2,but now everytime i am trying it is asking for billing information?
    Earlier when - today? Some time in the past? When did this start?

  • My icloud activation lock is ON my iphone, which requires an activation login to access the homescreen, but when i log in with the apple ID on the phone, it says the apple ID is not meant to unclock this iphone 5 ios 8.0.2. please help me solve this.

    My icloud activation lock is on my iphone, which requires an activation login to access the homescreen, but when i log in with the apple ID on the phone, it says the apple ID is not meant to unclock this iphone 5 ios 8.0.2. please help me solve this.

    Yes the phone belongs to me. It was purchased from United Kingdom Vodafone to West Africa, i had to factory unlock to use any sim in it. so it belongs to me. I did the activation myself, now after updating my iphone to the latest update, it required a user id and password to activate the phone, but anytime i enter the details, it tells me the user Id is not correct but the password is correct..

  • My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help.

    My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help. I can't find my answer on the Internet.

    By far the most common problem hardware-wise seems to be scuffs on the aluminium. Yours is the first report of a faulty screen I've seen.
    If you use the same Apple ID on both devices it'll sync whatever you want it to - music/apps/photos/messages/etc.
    I've just switched from a Galaxy S3 to iPhone 5 (having already owned an iPad for a while) so I'm in a similar position!

  • I deleted unwanted photos from my iPhoto library, emptied iPhoto trash & Finder trash... this did not free up disk space. please help!

    I deleted unwanted photos from my iPhoto library, emptied iPhoto trash & Finder trash... this did not free up disk space. please help!
    I have a 15-inch MacBook Pro (Late 2011) with OS X Mavericks 10.9.5
    Last week, my 500 GB Harddrive had 120 GB free space. I was feeling crumby and decided to make productive use of taking a day off to lounge around. I snuggled up with my laptop and dedicated hours to meticulously combing through my iPhoto Library. I had 13,000 pictures, and I got rid of those I didn't want. Having said "sayōnara" to about 6,500 pictures, I then emptied the iPhoto trash and the Finder trash. I took delight in the iconic paper crumpling sound of them vanishing into the digital void.
    Everything seemed perfect: the photos I loved were still there, the photos I loathed were gone, both trashes were beautifully empty. Having thrown away all of those awful, boring, and unflattering images of poorly light lunches and selfies gone wrong, my iPhoto library was half the size as before! I felt renewed, a little lighter, somehow more free, and I expected my hard drive to be a bit different to.
    I eagerly checked my storage stats. My heart sank to see that my 120 GB of free space, was still only 120 GB of free space. I restarted my MacBook; this did not help. I restarted it the next day; this also did not help. It's been 5 days and the hard drive still has 120 GB free space. This is not an emergency and it will probably be a good while before I clutter my laptop to the brim. Yet while I am glad I don't have to see cringeworthy pictures of my ex's unmentionables every time I'm showing off things I do want to remember, I'm still disappointed and now obsessed with solving this mystery.
    What is going on? I don't see them, so where are they hiding? How do I get the free space I should have earned from throwing away 1,000's of photos?!

    Thank you, Terence!
    Yes, I only emptied the trash when it was really full, once I waited until the trash cans contained 2,600 photos and then I emptied them - Oooops! In the future, I'll keep in mind your suggestion of deleting less than 100 photos at a time.
    I downloaded the iPhoto Library Manager and used it to rebuild my iPhoto. After a few hours of rebuilding, it generated a new copy of my iPhoto Library. This versions was nearly identical to the original (it was missing 5 photos and was therefore only 5 mb smaller). I guess my Library wasn't defective.
    I checked my storage stats, and interestingly, using iPhoto Library Manager did help with the problem that developed after I re-indexed my hard drive. My hard drive is able to properly recognize data categories again, instead of listing almost everything as "Other". Understandably, my free disk space changed from 120 GB to about 60 GB, because my hard drive now contained a second copy of my iPhoto Library as well as iPhoto Library Manager. It seemed like all I needed to do was throw these away, but when I emptied the trash, my problem was not solved. My Hard drive now looked like this:
    It appears to me that when I empty the trash, the things I throw away are just hanging around as backups instead of leaving! I went into System Preferences and turned of my time machine OFF. Now my hard drive looks likes this:
    The back ups of the iPhoto files, and the program which I deleted, are still on my hard drive some where but now they are listed as "Other" instead of "Backups". Do you know where they might be and how I can delete them for good?

  • Until recently I was able to send images in the body of my Yahoo emails. Now, I am getting the message "This message has been truncated", and the email does not go through. I do not have this problem using IE. Could you please help? Thank you.

    Until recently I was able to send images in the body of my Yahoo emails. Now, I am getting the message "This message has been truncated", and the email does not go through. I do not have this problem using IE. Could you please help? Thank you.

    Try this -> http://support.apple.com/kb/TA38632?viewlocale=en_US

  • TS1389 I am trying to authorise a new computer. The Apple instructions are to select Authorise this computer from the itunes store menu. I can't find this in any menu. Can you please help? How do I authorise my computer?

    I am trying to authorise a new computer. Apple's instructions are to select "Authorise this computer" from the itunes store menu. I can't find this in any menu. Can you please help? How do I authorise my computer?

    Authorization and Deauthorization
    Macs:  iTunes Store- About authorization and deauthorization.
    Windows: How to Authorize or Deauthorize iTunes | PCWorld.
    In iTunes you use the Authorize This Computer or De-authorize This Computer option under the Store menu in iTunes' menubar. For Windows use the ALT-S keys to access it. Or turn on Windows 7 and 8 iTunes menus: iTunes- Turning on iTunes menus in Windows 8 and 7.
    More On De-authorizing Computers (contributed by user John Galt)
    You can de-authorize individual computers, but only by using those computers. The only other option is to "de-authorize all" from your iTunes account.
      1. Open iTunes on a computer
      2. From the Store menu, select "View my Account..."
      3. Sign in with your Apple ID and password.
      4. Under "Computer Authorizations" select "De-authorize All".
      5. Authorize each computer you still have, as you may require.
    You may only do this once per year.
    After you "de-authorize all" your authorized computers, re-authorize each one as required.
    If you have de-authorized all computers and need to do it again, but your year has not elapsed, then contact: Apple - Support - iTunes - Contact Us.

  • Wat is wrong in this decode function, it doesn get executed,please help me

    wat is wrong in this decode function, it doesn get executed,please help me
    decode(DVI.COMPANY||'.')||
                                            DECODE(DVI.COST_CENTRE||'.')||
                                            DECODE(DVI.ACCOUNT||'.')||
                                            DECODE(DVI.LOCATION||'.')||
                                            DECODE(DVI.PRODUCT||'.')||
                                            DECODE(DVI.FUTURE)company_id,

    Hi,
    I could not understand what you are trying to do with decode here.
    The standard way of using the decode is like :
    SQL>SELECT DECODE (1 , 1 ,'TRUE','FALSE') FROM DUAL;
    DECO
    TRUE
    1 row selected.
    1* SELECT DECODE (1 , 0 ,'TRUE','FALSE') FROM DUAL
    SQL>/
    DECOD
    FALSE
    1 row selected.
    Please explain what you want to do with DECODE ?
    Regards

  • PSE11 and 12 will NOT display a JPG i open..... this just occured- have no idea why - please help??

    PSE11 and 12 will NOT display a JPG i open..... this just occured- have no idea why - please help??

    All JPEGs or a particular one?

Maybe you are looking for