--- WABBIT SEASON ---

Written by Sander Alsema for the 10-liner competition 2020.
Language: Commodore 64 Basic v2
Category: PUR-80


I prefer VICE, but you can use any emulator that works with *.d64 files.
If you haven't installed it yet, it can be downloaded from their website.

Here's how to use it:
 Click : File -> Attach disk image -> Drive 8
 Select: Wabbit Season.d64
 Click : Attach

Now, just as you would with a normal Commodore 64, you can type:
 LOAD"$",8                (to load the directory)
 LOAD"WABBIT SEASON",8    (to load the game)
 LIST                     (to view the directory or game listing)
 RUN                      (to run the game)

Be aware that you are now using a virtual Commodore 64 keyboard.
Therefore the keys will differ slightly from your physical keyboard:
use <SHIFT> '2' to display quotation marks.

---

        "Sssh. Be vewy vewy quiet. I'm hunting wabbits."

                                           (Elmer Fudd)


Even the greatest huntsman can use a little help from time to time.
Armed with the latest equipment, hunting becomes a piece of cake.

Every time a rabbit pops up out of his hole, just press the
corresponding number to shoot it.

If 3 rabbits manage to escape, you'll lose.

But when you kill 30 of the little critters, you'll win!

---

Line 0: Make a string that holds quotation marks.(they will form the
        eyes of the rabbits)

        Clear the screen.

        Set background colour to green.

        Create a vertical and a horizontal orientation string.


Line 1: Read the data of the various rabbit strings.

        Create the strings that point to all the rabbit holes.


Line 2: Display the rabbit holes.

        Complete the third rabbit string.

        Read the data of the rabbit-shot string.

        Read the data of the number-of-kills string.

        Read the data of the rabbit-shot-erase string.


Line 3: Display the number of kills in the top left corner.

        Start a loop to cover every rabbit hole.

        Use shorter variables for the status array and the timer array
        to save space further in the program.

        Decide whether a rabbit pops out of his hole or not, based on a
        randomly picked number being zero and the status also being
        zero. As the number of kills increases, the more likely it
        becomes that the random number is zero.

           Set the direction through the status to forward.

           Set the status.


Line 4: Read the keyboard.

        Calculate the value of the pressed key.

        If the status is set and the timer isn't, then display the rabbit
        string that corresponds with the current status.

           If the status is at its maximum, then set the timer and set
           the direction through the status to halt.

        This line also contains some string data.


Line 5: If the timer is set, then decrease the timer.

           If the timer is now clear, then set the direction through the
           status to backward and increase the total number of rabbits.

              If the rabbit in question was killed, then clear the kill
              marker, display the rabbit-shot-erase string and adjust the
              status.


Line 6: Update the timer array.

        If the pressed key was from 1 to 6 and the timer for that
        particular rabbit was set and that rabbit hasn't yet been shot,
        then increase the number of kills, set the kill marker and display
        the rabbit-shot string.


Line 7: Update the status array.

        If the status is zero than set the direction through the status
        to halt.

        If the number of kills is less than 30, and the number of escaped
        rabbits is less than 3, then continue looping to line 3.

        This line also contains some string data.


Line 8: Clear the screen.

        Display the number of kills.

        Display "GAME OVER".

        If the number of kills was 30 then display "YOU WIN".


Line 9: Wait for a little while.

        Restart the game.

        This line also contains some string data.

---