I am making a simple game on Turbo C using graphic mode.I want to generate random numbers in my way. I found the technique to generate random number as:
*i=random(10000)%40;
*j=random(10000)%40;
& there is created a rectangle as:
*rectangle(0,0,400,400);
The aim is to randomize the above numbers i&j
over the rectangular area but I don't understand how this is done and I can't understand when is pixel technique used in c graphic and when coordinates?
For example: If I want to write my name in coordinate point(50,2)
then the co-ordinate technique seems to be used.
I tried to find out but I couldn't figure out about text mode and graphic mode yet.
Aucun commentaire:
Enregistrer un commentaire