throw exception on createMov error
This commit is contained in:
parent
f8d406a458
commit
581cb8ae26
5
cell.cpp
5
cell.cpp
|
@ -250,9 +250,8 @@ void hrmap_standard::find_cell_connection(cell *c, int d) {
|
||||||
|
|
||||||
/** very similar to createMove in heptagon.cpp */
|
/** very similar to createMove in heptagon.cpp */
|
||||||
EX cell *createMov(cell *c, int d) {
|
EX cell *createMov(cell *c, int d) {
|
||||||
if(d<0 || d>= c->type) {
|
if(d<0 || d>= c->type)
|
||||||
printf("ERROR createmov\n");
|
throw hr_exception("ERROR createmov\n");
|
||||||
}
|
|
||||||
if(c->move(d)) return c->move(d);
|
if(c->move(d)) return c->move(d);
|
||||||
currentmap->find_cell_connection(c, d);
|
currentmap->find_cell_connection(c, d);
|
||||||
return c->move(d);
|
return c->move(d);
|
||||||
|
|
Loading…
Reference in New Issue