Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F86517
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
724 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/SRC/FantasmaRojo.cpp b/SRC/FantasmaRojo.cpp
index 056e127..ede3591 100644
--- a/SRC/FantasmaRojo.cpp
+++ b/SRC/FantasmaRojo.cpp
@@ -1,15 +1,17 @@
#include "FantasmaRojo.hpp"
#include "Pacman.hpp"
FantasmaRojo::FantasmaRojo(Tablero &mitablero,Pacman& j,Puntuacion& p,int x,int y) : Fantasma(mitablero,j,p,x,y,id_fantasma)
{
//ctor
}
void FantasmaRojo::moverNormal()
{
auto ruta = getRutaMasCorta(getPosition(),jugador.getPosition());
- ultimaPosicion = ruta[ruta.size()-1];
- escogerRutaMasCorta(ruta,getPosition(),jugador.getPosition());
+ if (ruta.size() >= 1) {
+ ultimaPosicion = ruta[ruta.size() - 1];
+ escogerRutaMasCorta(ruta, getPosition(), jugador.getPosition());
+ }
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Sep 12, 11:22 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42971
Default Alt Text
(724 B)
Attached To
Mode
R73 Comecocos
Attached
Detach File
Event Timeline
Log In to Comment