Movement Problems!!!

I am making a program that is game based. What it should do is:


We have two runners on a wall. In the corners of the wall there are prizes. The cost of each prize is determined, as well as the dimensions of the wall and the cooradinates of each runner. The speed of both players is equal. The answer is the number points each runner gained after collecting all the prizes.


I only have a base structure, but I have problems with moving the on the wall.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

//---------------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{
        int w,h,x1,y1,x2,y2,cost[4];
        cin>>w>>h>>x1>>y1>>x2>>y2;
        for(int counter;counter<4;counter++)
        {
                cin>>cost[counter];
        }
        while(cost[0]!=0||cost[1]!=0||cost[2]!=0||cost[3]!=0)
        {
        //game cycle
        }
        return 0;
}
//---------------------------------------------------------------------------
Last edited on
Topic archived. No new replies allowed.