Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F628152
FantasmaRosa.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
813 B
Referenced Files
None
Subscribers
None
FantasmaRosa.cpp
View Options
#include
"FantasmaRosa.hpp"
#include
"Pacman.hpp"
#include
<iostream>
#include
"FantasmaRojo.hpp"
FantasmaRosa
::
FantasmaRosa
(
Tablero
&
mitablero
,
Pacman
&
j
,
Puntuacion
&
p
,
int
x
,
int
y
,
FantasmaRojo
&
compa
)
:
Fantasma
(
mitablero
,
j
,
p
,
x
,
y
,
id_fantasma
),
companyero
(
compa
)
{
//ctor
}
void
FantasmaRosa
::
moverNormal
()
{
//if (rand()%2 == 0)
tablero
.
setColision
(
companyero
.
ultimaPosicion
);
auto
ruta
=
getRutaMasCorta
(
getPosition
(),
jugador
.
getPosition
());
if
(
ruta
.
empty
())
{
tablero
.
deleteColision
(
companyero
.
ultimaPosicion
);
escogerRutaMasCorta
(
getPosition
(),
jugador
.
getPosition
());
}
else
{
escogerRutaMasCorta
(
ruta
,
getPosition
(),
jugador
.
getPosition
());
tablero
.
deleteColision
(
companyero
.
ultimaPosicion
);
}
// else setDireccion(rand()%4);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 3:19 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
133215
Default Alt Text
FantasmaRosa.cpp (813 B)
Attached To
Mode
R73 Comecocos
Attached
Detach File
Event Timeline