Kess DuKe
-
Total Posts
:
56
- Joined: Aug 11, 2004
|
Who's the best programmer?
-
Dec 31, 2008 04:37
Program rajzolo_wasd; Uses crt; Var x,y:integer; gomb:char; Begin Textcolor(14); Clrscr; x:=40; y:=13; Gotoxy(x,y); Repeat gomb:=readkey; If(gomb='w')then begin y:=y-1; Gotoxy(x,y); Gotoxy(1,1); Write(x,',',y); Gotoxy(x,y); end; If(gomb='a')then begin x:=x-1; Gotoxy(x,y); Gotoxy(1,1); Write(x,',',y); Gotoxy(x,y); end; If(gomb='s')then begin y:=y+1; Gotoxy(x,y); Gotoxy(1,1); Write(x,',',y); Gotoxy(x,y); end; If(gomb='d')then begin x:=x+1; Gotoxy(x,y); Gotoxy(1,1); Write(x,',',y); Gotoxy(x,y); end; If(gomb='n')then write('*'); If(gomb='m')then write(' '); Until(gomb='x'); End. It is written in Free Pascal and you can draw with it.
<message edited by Kess DuKe on Dec 31, 2008 04:40>
|
|