Commit 1a50add8 authored by Sergey Kireev's avatar Sergey Kireev
Browse files

bug fixed in sqr8

parent 50bc9152
......@@ -443,6 +443,14 @@ class NLE_sqr_CA : public NLE_CA_base<hood_type> {
return true;
}
virtual void do_move_NL(int bi,int bj,int dir) {
ca::hood.move(bi,bj,dir);
int opp = oppdir[dir];
for (int k=0;k<nsize;k++)
ca::getfix(bi+side[opp][k].x,bj+side[opp][k].y) = nle::L;
nle::put_N(bi,bj);
}
virtual void print_neighbourhood(int bx,int by,int dir) {
int x0 = -1, x1 = nsize+1;
int y0 = -1, y1 = nsize+1;
......@@ -739,14 +747,6 @@ class NLE_sqr4_CA : public NLE_sqr_CA<hood_vonNeumann> {
count[2] = sll;
}
virtual void do_move_NL(int bi,int bj,int dir) {
ca::hood.move(bi,bj,dir);
int opp = oppdir[dir];
for (int k=0;k<nsize;k++)
ca::getfix(bi+side[opp][k].x,bj+side[opp][k].y) = L;
put_N(bi,bj);
}
virtual void do_move_group_NL(int label,int dir) {
switch(dir) {
case 0: { // up
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment