Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F133061
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
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
Tue, Jun 16, 1:12 AM (2 w, 21 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72754
Default Alt Text
(724 B)
Attached To
Mode
R73 Comecocos
Attached
Detach File
Event Timeline