Help me and I'll make you rich.

Sep 17, 2012 at 1:36am
My idea:

int world [][]={ {1,1,1,1,1},
{1,0,0,F,1},
{1,M,0,0,1},
{1,0,0,P,1},
{1,1,1,1,1} }

Where 1 = boundary (can't walk thru)
0 = paths (can walk thru)
P = person
M = money
F = food

main = person walks to money and puts in pocket. Person then walks to food.

I'm certain when I understand what this looks like in C++, I'll be soon to rule the world.

P.S. How do I make my posts look like code like the rest of you?


Sep 17, 2012 at 1:41am
Use the code tags under format its the picture of <>

1
2
3
4
5
int world [][]={ {1,1,1,1,1},
{1,0,0,F,1},
{1,M,0,0,1},
{1,0,0,P,1},
{1,1,1,1,1} }
Sep 17, 2012 at 1:49am
Test:

1
2
3
4
5
int world [][]={ {1,1,1,1,1},
{1,0,0,F,1},
{1,M,0,0,1},
{1,0,0,P,1},
{1,1,1,1,1} }
Sep 17, 2012 at 1:51am
That was easy.

Thanks.
Topic archived. No new replies allowed.