Está en la página 1de 1

E ID E tcaA rP laR cIu N oeC lisIte P iA L:dedosvehículos,demostrandográficamenteyconeldesarrolodellenguajedeprogramaciónc++ylautilizacióndealgunasnuevaslibrerías.

J U E G O D E C A R R IT O S E N C ++
#Cv
# iio nsiid
rn ccllix u
ru
g od F
etr< < c so n
td lio
ob
ó ..n
nr> h >s2
v
{c
te
g
te lo
o x
rx totc d o
o i();n ylld o
(3
o se r9 (9
,5 6u w
,3 );c
);p i);c
n crid ipo
n tw fien ("n tf.1h -">E
((v "IN
olS ipdT )Rp
arro aU co C
osm Cito IO Nze
d EaeSrl"eju
);lju egeoge ospe ressqio
univaacru
loaslqcuairerote
scela
n-"
em
);igosyobtenerlamayor cantidaddepuntos\n2-Tem uevesconlasflechasizquierdayderecha\n3-Cada60puntosaumentaunnivel\n4-Puedesponerpausaconlateclaenteryreaundaeljuegoconcualquiertecla\n5-Tienes3vidas\n6-Alchocarconuncarroenemigoperderasunavida\n7-Eljuegoacabacuandochocas3veces");
g
}c
{v
g
o
le
o
o
to
tc
s
toid ch rx
x e(); y
yn n (1
(4e erm (9
0,e
1
,1
,w
,z
,x i);g 7o
););c
);c
pd rpieq
p
rriin (iri(tfn
i(itfn tf("
tf(
t"*y -P
"**,i");*);n
");tx,intz,intw,inte)
en
g
{}v
g o
o to
toidx x ey y (4
(3 m 0
4
5 ,,y
,z
,x
,y w ig );c o
););c
ipz
rpio
n
rrin nn tf"t((""y***",i*);n ");tx,intz,intw,inte)
g
}vo
{te
g o xto toidx
tc o
x cy yla(4
(3
orr4
(3 o,e
(9
5 ,2 i);z);cqp
1
2
3 );c (vp n
p itfrrdii(tfn)"(tf(
n tf(""""**););**
g
g o
o to
to x
x y
y (3
(4 4
1
0 ,2
,2 4
1
2
3
4 );c
);p
);p p rriiin ntf( tf( ""););");
}v
{te
g o
o xto toidx
tc o cy la(3 orr0
(4 o
(9
1 d
,2 );e1 1
2
3 r);c
);c (vo p rrdiitf( n )tf(tf(""""**"**
g
g
}v
i{c
o
o
o toid x
x cm ya
y (4
(3 ri;rzo 5
4 ,2
,2 s(); (v
4
2
3
4 );p
);p o,zid
p rr)iin n n
tf( "="1");",e ););= ");
rj[0
{w n ah tna ]=b d re,y
;fo
2a(t= ;,s
= j= [1-2 = ]1 = ,x
,ez,1 1)2 3= ;j[2-1 ]= 40;,,ew -3,r,m=0,d,g,k,n=22,h=22,f=0,p=1,i,t=1,j[3],q=60,u=1,c=2;
y
m
c
g
te = lh
o r=-2
x
il0
stc
to c,x r(p
x
o =
(); y= lh (3
o 0-1 ;u = (1
8 = )12
);= );0 q,w
;);c == p 61 0n
rriin
;tf(="-3
tf("C
;AR rerR siIv Tn O Slc"au)s ;ain
g
is f(s= lo rin to
g =cs e= rxtr
tc y
c (2 cra()rc (9
2 r;(2 ,1 4
6
7 )));c p -P a a o era lqs utrieurcte cio cnlaep saprraecsoio
mnaenezsacr"); {ificilpresiona5\n\nExtremopresona6\n\nElige:");
c
te
g
s
{c
d
b cr=
w
a o }x
e
s
to
a
s itc
4 te
a n
e ckx
5
of1
h
; ((); yu "l:% o
(3
(1 (g (9
),3 i"5i,2 ,o );n
);p
& ge
);c s
r);ip n2 rtfi(); n ("tfM ("uE ylifa gecildip firceusltio an d"a);1\n\nFacilpresiona2\n\nMediopresiona3\n\nDificilpresiona4\n\nMuyd
c
d
ba
c
d
b
c a
ar= =
re
r= es
e s
s1 3
2a ae
a e5 5
5k k;;4
k ; 2
3: :
d
b
c
d
b
c
d
b
}c
a
a r=
lr= ree s
s
s
8
2 a
a e
e
c ;;k k rd ;5:::
;6
();
g
te o x to rtc x
o yl(1 (1rr()4
o
(5 21;,1
(1 ,3 3);4
1 ););c p rriin tf"tf(("P"n i"vA enlA % i"O :,u );U
c
g
g
te
g
g
w
ao o
o
o
h xrtoto
to
to iltc
o
eto
x
x
o
x
x(j[0
y
y
y
y l(5 e
(2
(5
(7
(6
o
(5 r]< ,,01
(1
0
0
,2
,3
,4
,5 =
0
2
6
8
2 );44
);c
);c
2
);c
p
);p
p p
p
)
p
rriirrn
n ip
in
n
tfritf(tf(
tfn (n
tf "((""P%
%
"P
R
Y
R
A pR c%
c
E
E u
)S
"A
"
S
;R ,c
, 3P
3 IIO ta
O);O
);
N
C
Nje N A
A %
M
EC E
R NEi"P
N ,T
m
A L
ZU
E
A )A
Q
R ;R
U"S)A;"IE
);");RTECLA");
g o x y (3 0 ,
6;,,jj[0j [2 ]);
[1]);printf("% r i n tf ( " " ,2 5 4 ); {
go
g
j[0
j[1
}j[2
o]= toj[2
to j[0
j[1 xy
x y(3 (4 8 [2
[1
[0
[2
[1
);[0p]);rip rintf("|""")))c;;;",254);
tea
s
{c
g
b
c w
a ro xes sitc
to te
a eck kx o
xh ;4y yl(1 (o
5
(9 d::r)]1 ,(1
+3
2,2 4);c
4 pn tftf(("M Fuaife ycd ilfai"oc);"i);l");
g
b
c
g
b
c a
a ro
ro e to
eto
s
to
s a
a e
e k x ;3
;2 y 5
(1
5 ::0 1 ,2 4);c
4 );cp
);c p rrriiitfn
n
n tf( """D M
g
b
c
g
b a ro
ro e
e s
to a
a e k
kx
x ;1
;8
;y
y
y(9
5
::(1
(1,02,2
,2 4);c 4 prpin rin(tf("M
tf( uxyitrcdeilim f"ic);oil""););
c
g
b
}g
}ip
{w =ah ro
e
= 1es to
tc ;2aee ;k h x2
(i(); ==]< 1)2[1
4);c "E
gilo
g
g oto
o to
to
(j[0 xy
x
x y(3
y (3=
(4 0,,,jjj[0
6
8
4)]);printf("%
[2
[0
[2
[1
[0
[2
[1 ]);p
]); prriin ntftf((""% |"""))c)c;;;"",,2 25 54 4);); {
j[0
j[1
}j[2 2;]= j[0
j[1
po
te
g
te
rg
=
o x1to
x to tc
tc o
x
o
x yj[2
y llo o
(6
(5 rr=e
]0 (1
2
(1
+,2 31
3
;4
););2);c
);pp rirnin tf(tf(""ep su cn pta ara je:% sai"lr,m "););
iw
{r}i{b
=
ff=(e
(b h
= 1r=
il;=
;a=
en = (r-3 d(1
0 = )o|m
2 1= ,3 (3)=);c );5p)rintf("nivel%i",u);
}{r}e
g
S
w =h ls0
o
le to ile;e p xtc
(k (yd (1 b);t= ()h,rr;1i(7 t4 );p
())7))rintf(" ");
i{a =
f(a
(a }f= g = p e= = c h a (2 {
iiifff(a k
}c
k
}c=
=
a = r3 =rr= 5
o c
c ;ih h =
iz a
aeq rr(7 (());;;75))))
{{{
(a te a = e xr4 =
tc
1
o c;x o h d
yllao o r(1 (2,1 3);))3);p );cp ritf( ntf(""PA "U );SA");
}if(b (b }g
}te
o = xe to
= tc 1h o
();
))ig
(5 0 rin {nemigoizq(y,x,z,w,e);
iiff(x te = x = tc 5;2o loorrd (c
(c e));;r(y,x,z,w,e); e
{{
iiifff(z
(y }}ey+
x
}
n
+
<
<
<
+ 2
2
+
2
m
5
5; ))
) {{{}
(w z
}w + + <2+ + 26;5)) ;
iiff(j[0
(e }e
{j[0
j[1
}j[2
+ < +
]=
]= ;= 3;2=62)7)
4
2
{
{j[0
j[1
}j[2
{j[0
j[1
}j[2 iiff(j(j]= [[]= 0]=
0 ]=
4
4
2
3
2
3 ;=25)
;
if(e m y =
if--(o =
m -2 = m 2,x + 6 = )3 -1
; ,z = 0 , w = 1 ,e = -3 ; {{
d
q
u
g
g y= =
+
o ;to
-2 q=
+
to + ;x x= 6y q
y=0(5 (5 ;-1 )0,12);printf("pasastedenivel");
0,z,1=4 40);p
6 ri1 ntf( "p -3a r;ed ra s--ico;o nn aticn"uu aalqr"u );iertecla");
g
c
}g + e tc
+ ;3,x h x5(); 2 ,w= ,e= ");); ");
if(k if= (o {f+ nif=(fo
to = + =
= ;=
y
w& (5 )& 0b,1 == 6 );p
1) rintf(" {
g
g
te
g o
o x to
to
to tc x3y
x
o
x y)l(5
y (5r0
(5
o 0,1
(1
5
(9 ,3
,4
,8 2
); );pp
);
);c
0
2 );c rip nin
r tfin
r ("tf(
tf ( """P )p;-P E R
a r D
e
a s I
v iS
o T
o n E
l va"e);
r na te jur "g );a r" ) ; gotoxy(50,5);printf("");
te= xto iltce= o ylh o= ()r0 (1 )07 ););cprintf("p
4
g
{w
{s
f=
p
}t= iif= f(s o
h
=4g 4;=;;e=
x (f=
tc c (5 a r;3(2 ,1 6 )) -P are assioan lia rdsecl"ju );ego");
{p
}f=
}{f= iiif= (s
=
(s 41;=
2 !=cch haarr(1 (133)& ))&s!=char(27))
w
{p
g h3tc
=
o
e to il;;eh
3 x (p (); y (5 == 0 2)4
,1 2 );p r in tf( " p r
a er s
a io
u n
s a r lao fl
tr e
a cv h i
da ad "er
)
; e c h a " );
g iff= o-2 to x1y= (5-10,z,1=4 2);printf(" "); ");
}{y
}{g iy = (f(fo-2 =
=
to
=,x
= ,x x2y y=))(5-1 0,z,1 ,4=8
,2 );0
0
0p,,w w ri= =
n1 1
tf(,,e e
"= ="-3 -3
);;; go
goto
tox
xy
y(5
(50
0,5
,5););p
prriin
ntftf((""""));;
if(k }if= (g }g
{f+
ig
fte h =(fo = +
to
4=
=;1= w& x
3 )& )
(3 b=4= 29));printf(" "); {
o
o xto to
to tco x
oy
x y
ylo (5
orrr(1
(5 0
(1,1
5 ,3
,4
,8 );26 );
);c p pp r i n
rin tf ( " " ) ; gotoxy(50,5);printf("");
teh
g
te
g o
o x
x to tc
iltc o
x
x yllh o
(5
(5 ()0
(9
0 )0
,1 0
);2
4 );c ritfn(tf("P "p ER
-P
-P arre D
e
as sIs
viiS
oT
o onn E a
lilva
");nacte
redrs el"ju ju);r"ge)g
;ao r""));;
w
{s
{f=
p iif= f= =4g
(s 4 ;=;;e= = (f=
tc c =a r;3(2 7 )));cprintf("p a a a
}t=
{p
{}f=
f=
}w iiif= (s
=2
(s
h
41;=
3 il ; !=e c
(p
ch haarr(1
= =
(133)&
2 )
))&s!=char(27))
{po
g
g =tc to 3;h x1(); y)(5 (50 0,1 ,14 2);p
4 );prriin ntf( tf(""pa rera siu os narla fl);a
o"tr ecvhid a"a);i"z)q
;uierda");
e =);20p
}{g iff=
iy o
(f(fo to
=
-2
= =,x
= x
x2y=
y= )(5-1 -10,z,4 ,w = 1
tf(,,e e = -3
);;; gotoxy(50,5);printf("");
}{g
}g y = to
-2 ,x ,z,1 ,2=8 0r0);p
9 ,w ri= n1 "= "-3 gotoxy(50,5);printf("");
}go }to xoyto (3x0y,2 (450);p intf(r"intf(" "); ");

También podría gustarte