{(int i = 0; i <4; i + +)
{(m [i, 0] <0 | | m [i, 0]> 9); (m [i, 1] <0 | | m [i, 1] > 18); (MainWindow.table [m [i, 0], m [i, 1]] == true)
{f = false; (int i_ = 0; i_ <4; i_ + +)
{(m [i, 0] == coord [i_, 0] && m [i, 1] == coord [i_, 1])
f = true;
} (! f);
}
};
} remove ()
{x = 0; y = 0; (int i = 0; i <4; i + +)
{
x = coord [i, 0];
y = coord [i, 1];. table [x, y] = false;
}
} createTank (string pose)
{(pose)
{"center":
setCoord (5, 8, 5, 9, 4, 9, 6, 9);; "down":
setCoord (4, 17, 4, 18, 3, 18, 5, 18);; "up":
setCoord (6, 1, 6, 0, 7, 0, 5, 0);
state = 3;; "left":
setCoord (1, 7, 0, 7, 0, 6, 0, 8);
state = 2;; "right":
setCoord (8, 9, 9, 9, 9, 10, 9, 8);
state = 4;;
}
} toTable ()
{(int i = 0; i <4; i + +). table [coord [i, 0], coord [i, 1]] = true;. Inv ();
} copy (int [,] m1, int [,] m2)
{(int i = 0; i <4; i + +)
{(int j = 0; j <2; j + +)
{
m1 [i, j] = m2 [i, j];
}
}
} left ()
{(coord [0, 0] == 0 | | coord [1, 0] == 0 | | coord [2, 0] == 0 | | coord [3, 0] = = 0); x = 0; y = 0; x1 = 0; y1 = 0; f = false; (int i = 0; i <4; i + +)
{
x = coord [i, 0];
y = coord [i, 1]; (MainWindow.table [x - 1, y] == true)
{(int j = 0; j <4; j + +)
{
x1 = coord [j, 0];
y1 = coord [j, 1]; (x - 1 == x1 && y == y1)
{
f = true;;
}
} (! f) return;
f = false;
}
} ();
coord [0, 0] -;
coord [1, 0] -;
coord [2, 0] -;
coord [3, 0] -;
toTable ();. Inv ();
} right ()
{(coord [0, 0] == 9 | | coord [1, 0] == 9 | | coord [2, 0] == 9 | | coord [3, 0] = = 9); x = 0; y = 0; x1 = 0; y1 = 0; f = false; (int i = 0; i <4; i + +)
{
x = coord [i, 0];