Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    21
    Rep Power
    0
    Originally Posted by NormR
    See post #12 for 2 possible solutions.
    Normally I would do that but I can't assign them to values, I need to do it in the way that I'm comparing the Strings.
  2. #17
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,713
    Rep Power
    348
    I need to do it in the way that I'm comparing the Strings
    Why? That is a very cumbersome way to do it.
    With java 1.7 a switch statement could be used to assign a value to a suit.
  4. #18
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    21
    Rep Power
    0
    Originally Posted by NormR
    Why? That is a very cumbersome way to do it.
    With java 1.7 a switch statement could be used to assign a value to a suit.
    I know, it would make much more sense to do it with a Switch statement or the other ways that you have suggested but it says specifically that it's to be done.
  6. #19
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    21
    Rep Power
    0
    I have my logic written here but it's just trying to convert it into code.

    If this card is a diamond then its the largest else

    If this card is a club and the largest card is a heart or a spade then this card is the largest else

    If this card is a heart and the largest card is a spade then this card is the largest

    All other conditions means that the largest card is the same as thus card
  8. #20
  9. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,713
    Rep Power
    348
    How does the logic you just posted initialize largest card?
    If this card is not a diamond, what happens?
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo