PPT Slide
// Update the screen with new coordinates
static void UpdateFrame(char* direction)
LPDPID lpmsgFrom = new DPID; //ID of player sending the message
LPDPID lpmsgTo = new DPID; //ID of player who will receive the message
MESSAGE *pMessage = new MESSAGE;
static SIZE size; //To store text size
static int xchange = 1; //Change along x direction
static int ychange = 1; //Change along y direction
static int x = window_width/2;
static int y = window_height/2;
//The other player's initial coordinate
static int x1 = window_width/2;
static int y1 = window_height/2;
//-------- To introduce delay in updating screen-----------
static DWORD lastTickCount = 0;
thisTickCount = GetTickCount();
if((thisTickCount - lastTickCount) <= UpdateDelay)
lastTickCount = thisTickCount;
//----------------------------------------------------------
If we had used, say, 5ms,