Lab 5.2 - FFT Helper

Final Fantasy Tactics

Final Fantasy Tactics is a great strategy game. As a pure strategy game, it doesn't use random numbers. Instead, it uses an interesting and rich compatibility system to determine the effectiveness of each attack, spell, or ability. Because of all the interestingness and richness, it can get a bit complicated. That's where you come in.

Each character in the game, be it a hero, animal, or monster, has one of the twelve zodiac signs and a gender (either female, male, or neither--don't freak, the last one is for monsters). Then, depending on these relationships, the compatibility is rated as Best, Good, Neutral, Bad, or Worst.

Here's a list of all the compatibilities, thanks to Andrea Robinson's and her excellent compatibility FAQ.

---------------------------------------------------------------
 Capricorn          | Aquarius           | Pisces             |
--------------------|--------------------|--------------------|
 Best/Worst Compat. | Best/Worst Compat. | Best/Worst Compat. |
  Cancer            |  Leo               |  Virgo             |
                    |                    |                    |
 Good Compatibility | Good Compatibility | Good Compatibility |
  Taurus            |  Gemini            |  Cancer            |
  Virgo             |  Libra             |  Scorpio           |
                    |                    |                    |
 Bad Compatibility  | Bad Compatibility  | Bad Compatibility  |
  Libra             |  Taurus            |  Sagittarius       |
  Aries             |  Scorpio           |  Gemini            |
                    |                    |                    |
 Neutral Compat.    | Neutral Compat.    | Neutral Compat.    |
  Capricorn         |  Aquarius          |  Pisces            |
  Aquarius          |  Pisces            |  Aries             |
  Pisces            |  Aries             |  Taurus            |
  Gemini            |  Cancer            |  Leo               |
  Leo               |  Virgo             |  Libra             |
  Scorpio           |  Sagittarius       |  Capricorn         |
  Sagittarius       |  Capricorn         |  Aquarius          |
---------------------------------------------------------------

---------------------------------------------------------------
 Aries              | Taurus             | Gemini             |
--------------------|--------------------|--------------------|
 Best/Worst Compat. | Best/Worst Compat. | Best/Worst Compat. |
  Libra             |  Scorpio           |  Sagittarius       |
                    |                    |                    |
 Good Compatibility | Good Compatibility | Good Compatibility |
  Sagittarius       |  Virgo             |  Libra             |
  Leo               |  Capricorn         |  Aquarius          |
                    |                    |                    |
 Bad Compatibility  | Bad Compatibility  | Bad Compatibility  |
  Cancer            |  Leo               |  Virgo             |
  Capricorn         |  Aquarius          |  Pisces            |
                    |                    |                    |
 Neutral Compat.    | Neutral Compat.    | Neutral Compat.    |
  Aries             |  Taurus            |  Gemini            |
  Taurus            |  Gemini            |  Cancer            |
  Gemini            |  Cancer            |  Leo               |
  Virgo             |  Libra             |  Scorpio           |
  Scorpio           |  Sagittarius       |  Capricorn         |
  Aquarius          |  Pisces            |  Aries             |
  Pisces            |  Aries             |  Taurus            |
---------------------------------------------------------------

---------------------------------------------------------------
 Cancer             | Leo                | Virgo              |
--------------------|--------------------|--------------------|
 Best/Worst Compat. | Best/Worst Compat. | Best/Worst Compat. |
  Capricorn         |  Aquarius          |  Pisces            |
                    |                    |                    |
 Good Compatibility | Good Compatibility | Good Compatibility |
  Scorpio           |  Sagittarius       |  Capricorn         |
  Pisces            |  Aries             |  Taurus            |
                    |                    |                    |
 Bad Compatibility  | Bad Compatibility  | Bad Compatibility  |
  Libra             |  Scorpio           |  Sagittarius       |
  Aries             |  Taurus            |  Gemini            |
                    |                    |                    |
 Neutral Compat.    | Neutral Compat.    | Neutral Compat.    |
  Cancer            |  Leo               |  Virgo             |
  Leo               |  Virgo             |  Libra             |
  Virgo             |  Libra             |  Scorpio           |
  Sagittarius       |  Capricorn         |  Aquarius          |
  Aquarius          |  Pisces            |  Aries             |
  Taurus            |  Gemini            |  Cancer            |
  Gemini            |  Cancer            |  Leo               |
---------------------------------------------------------------

---------------------------------------------------------------
 Libra              | Scorpio            | Sagittarius        |
--------------------|--------------------|--------------------|
 Best/Worst Compat. | Best/Worst Compat. | Best/Worst Compat. |
  Aries             |  Taurus            |  Gemini            |
                    |                    |                    |
 Good Compatibility | Good Compatibility | Good Compatibility |
  Aquarius          |  Pisces            |  Aries             |
  Gemini            |  Cancer            |  Leo               |
                    |                    |                    |
 Bad Compatibility  | Bad Compatibility  | Bad Compatibility  |
  Capricorn         |  Aquarius          |  Pisces            |
  Cancer            |  Leo               |  Virgo             |
                    |                    |                    |
 Neutral Compat.    | Neutral Compat.    | Neutral Compat.    |
  Libra             |  Scorpio           |  Sagittarius       |
  Scorpio           |  Sagittarius       |  Capricorn         |
  Sagittarius       |  Capricorn         |  Aquarius          |
  Pisces            |  Aries             |  Taurus            |
  Taurus            |  Gemini            |  Cancer            |
  Leo               |  Virgo             |  Libra             |
  Virgo             |  Libra             |  Scorpio           |
---------------------------------------------------------------

The Best/Worst compatability works a bit oddly. If the two characters are the both male or both female, then the compatibility is Worst. If one is female and the other male, the compatibility is Best. Otherwise the compatibility is Bad.

Create a program in which the user selects the zodiac sign and gender of each of the two characters and clicks a button. The program then determines the two characters' compatibility.

For extra fun, you're not getting an object list. You're old enough to make one of your own. =i)

HINT: Notice that when the zodiac signs are arranged in a circle, the sets of Good compatibility signs make equilateral triangles (every fourth sign), the sets of Bad compatibility make squares (every third sign), and the Best/Worst pairs are directly across from one another. Here's a pic created by Jonathan D. Wells.