#include <conio.h>
#include "wgt.h"

/*   WORDUP Graphics Toolkit   Version 1.0
     Demonstration program 2

Draw pixels with random colour in random places until you hit a key.
***** wgetpixel will return the colour at a specific coordinate. It
is not included in this example file.

*/

int x,y,col;

void main(void)
{
vga256();		// initializes system
do {
   wsetcolor(rand() % 255);
   x=rand() % 320;
   y=rand() % 200;
   wputpixel(x,y);
   } while (kbhit()==0);
getch();		// get the key
textmode(C80);		// used to return to text mode
}