View Single Post
Old 28-07-2006, 03:55 AM   #57
guesst
Abandonia Homie
 
guesst's Avatar

 
Join Date: May 2005
Location: Aurora, United States
Posts: 606
Default

<div align="center">Hurkle</div>
I mentioned that this isn't that great a game. Well, at least it's short.

So what is a Hurkle? Why do we hunt them and their cousins the mugwumps so? Why do these elusive prizes inspire such games of hide and seek? What does a hurkle or mugwump look like?

In this game the Hurkle has evolved from it's original incarnation and has gained the power of flight. Thus you must find the hurkle not just in x and y, but in z as well.

Code:
/* Hurkle hunt in 3D
 * by Joseph Larson 2005
 * Inspired by a BASIC program by Bob Albrecht
 * as found in 'BASIC Computer Games' edited by David H. Ahl (c) 1978
 */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>

#define MG 10
#define SIZE 10

int main (void) {
**int hx, hy, hz, x, y, z, c;
**char yesno;

**printf ("Hurkle Hunt in 3D\n\n"
**"A hurkle is a cute little creature, that in this game can fly. The hurkle\n"
**"is hiding in a region %d x %d x %d. After every guess your special hurkle\n"
**"locator will tell you which way you need to go. Keep in mind that 1,1,1 is\n"
**"the lowest northwest corner.\n", SIZE, SIZE, SIZE);
**printf ("Input your move by typing the x then y then z coordinate seperated\n"
**"by commas like \"1,2,3\"\n\n");
**srand (time (NULL));
**do {
****hx = rand () % 10 +1;
****hy = rand () % 10 +1;
****hz = rand () % 10 +1;
****printf ("The hurkle is ready.");
****for (c = 1; c <= MG && !(x == hx && y == hy && z == hz); c++) {
******printf ("\nWhere do you want to look? (X,Y,Z) : ");
******scanf ("%d %*c %d %*c %d", &x, &y, &z);
******printf ("The hurkle is ");
******if (y < hy) printf ("south");
******if (y > hy) printf ("north");
******if (x < hx) printf ("east");
******if (x > hx) printf ("west");
******if ((x != hx || y != hy) && z != hz) printf (" and ");
******if (z < hz) printf ("up");
******if (z > hz) printf ("down");
****}
****if (c <= MG) printf ("HERE!\nYou found the hurkle!\n\n");
****else printf ("\nThats %d trys and you didn't find the hurkle.\n"
******"The hurkle was hiding at %d, %d, %d.\n\n", MG, hx, hy, hz);
****printf ("Would you like to play again? (y/n) ");
****while (!isalpha (yesno = getchar()));
**} while (tolower (yesno) != 'n');
**printf ("Good bye for now!");
**exit (0);
}
Aside from being short, the reason this game was too lame for me to include on the list is that there is no modivation for the hurkle to hold still, yet it does, no modivation for us to not just spot the hurkle where it's at, but we don't, and any attempts to resolve these issues are contrived. The game is academic at best. It's not even that fun to play. Just choose a spot in the center, and then subdivide the distance remaining in whatever direction indicated. You'll win every time. The only surprise is if you find it on your second or third guess. Adding the third dimension was an attempt to complicate the game by way of making one more thing to keep track of, and in that it worked. But it didn't up the satisfaction of winning much for some reason. Not for me anyways.

However, there's hope that in your home the hurkle will find more love than he has found in mine.
guesst is offline                         Send a private message to guesst
Reply With Quote