
como hacer para mover algo con la libreria graph en pascal
Publicado por Manuel (12 intervenciones) el 05/11/2013 04:12:12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
PROGRAM GALAXY;
USES CRT,GRAPH;
VAR
modo,driver:integer;
X,Y:WORD;
mov:char;
begin
Driver := VGA;
Modo := VGAHi;
InitGraph(Driver, Modo, 'C:FPC');
X:=325;Y:=380;
rectangle(630,400,10,50); {cuadro del juego}
repeat
outtextxy(X,Y,'O');
mov:=readkey;
if (x>0) and (x<620) then
if (mov='M') then
x:=x+50;
outtextxy(X,Y,'O');
clrscr;
IF (X>1)
then
if (mov='K')
then
x:=x-50;
outtextxy(X,Y,'O');
clrscr;
until(mov='s');
end.
No se mueve la Pelota!... -!
Valora esta pregunta


0