question
hey guys! this is a question i''ve had for some time now, so here it goes...i recently finished my tic-tac-toe game(only a two-player game,console mode in c++) and in my program, i have a Draw_Grid() function that would draw the game grid. but i was wondering, how do i make it so i don''t actually have to call this function? i''m not sure if i am making sense, but i think it has something to do with blitting? like, after i call Draw_Grid, i use system("cls"); to clear the screen and wait for the second player''s input, and then call Draw_Grid() again. i was searching around for some info, but i don''t know what to actually search for. any help would be great! thanks!
May 24, 2002 09:13 AM
Generally, you can sum up the main program loop for almost any application as:
Input(); // read the player(s) input
Process(); // update the game world based upon that input
Output(); // draw the screen
in Output(); simply clear the screen at the beginning and then redraw your grid. Easy.
Input(); // read the player(s) input
Process(); // update the game world based upon that input
Output(); // draw the screen
in Output(); simply clear the screen at the beginning and then redraw your grid. Easy.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement