Professional Documents
Culture Documents
Mini Project Report Pacmanmoodle
Mini Project Report Pacmanmoodle
Technology Used:
C and C++ Programming Language in TurboC/C++ software. C++ is an object-
oriented programming (OOP) language that is viewed by many as the best
language for creating large-scale applications. C++ is a superset of the C
language.
The Turbo C++ editor is used to create the source file, compile, link and
execute programs.The graphics. h header file provides access to a simple
graphics library that makes it possible to draw lines, rectangles, ovals, arcs,
polygons, images, and strings on a graphical window. The second step is initialize
the graphics drivers on the computer using initgraph method of graphics.
i.) setviewport() :
setviewport establishes a new viewport for graphics output. The
viewport corners are given in absolute screen coordinates by (left,top)
and (right,bottom). The current position (CP) is moved to (0,0) in the
new window.
ii.) outtexttxy() :
outtextxy() function which displays the text or string at a specified point (x, y)
on the screen. Syntax : void outtextxy(int x, int y, char *string); where, x, y are
coordinates of the point and, third argument contains the address of string to be
displayed.
iii.) gotoxy() :
places the cursor at the desired location on the screen. This means it is
possible to change the cursor location on the screen using the gotoxy() function.
It is basically used to print text wherever the cursor is moved.
iv.) settextstyle():
v.) fflush():
fflush() function causes the system to empty the buffer that is associated with
the specified output stream, if possible. If the stream is open for input, the
fflush() function undoes the effect of any ungetc() function. The stream remains
open after the call. If stream is NULL, the system flushes all open streams.
vi.) randomize():
vii.) restorecrtmode() :
restorecrtmode restores the original video mode detected by initgraph.
This function can be used in conjunction with setgraphmode to switch
back and forth between text and graphics modes. textmode should not
be used. For this purpose; use it only when the screen is in text mode, to
change to a different text mode.
viii.) pieslice() :
pieslice() draws and fills a pie slice with center at (x, y) and given radius
r. The slice travels from s_angle to e_angle which are starting and
ending angles for the pie slice. The angles for pie-slice are given in
degrees and are measured counterclockwise.
ix.) putpixel() :
Conclusion: