1. ## Gotoxy

I know how to use gotoxy, but how might I use that to create a wall. Heres the scenario: I've created a program where you move an asterisk around the screen. Well I want to turn that in to a maze program. How might I go about making walls?

2. you could use #.

I don't mean it like that... How would I make the wall actually stop the asterisk?

4. if ( asterix_current_square +1 == '#') // do whatever to stop asterix moving to square.

5. ## YAAAWWNNN

im bored

I tried that statement but I don't know what kind of equation can keep it from going... like an equation that can block it all together...

7. ## Never Mind

Nevermind I got it...

I don't mean it like that... How would I make the wall actually stop the asterisk?

9. Instead of #, use char 219. It's a solid block.

If your game 'arena' is an array of [80] [24] then the following will work:

Code:
```.
.
.
char inkey;

while (1)
{
if (kbhit ())
inkey = getch ();

if ((inkey == '6') && (arena [x + 1] [y] != 219))
{
x++;
gotoxy (x - 1, y);
printf (" ");
}

if ((inkey == '4') && (arena [x - 1] [y] != 219))
{
x--;
gotoxy (x + 1, y);
printf (" ");
}

if ((inkey == '2') && (arena [x] [y + 1] != 219))
{
y++;
gotoxy (x, y - 1);
printf (" ");
}

if ((inkey == '8') && (arena [x] [y - 1] != 219))
{
y--;
gotoxy (x, y + 1);
printf (" ");
}
}```