override public void execute() // отменить передвижение { if (f != null) { if (f.canmove(moving, max_w, max_h) == true) { if (move == 1) { f.setMove(3); f.changeLocate("down", max_w, max_h);; } if (move == 3) { f.setMove(1); f.changeLocate("up", max_w, max_h);; } if (move == 2) { f.setMove(4); f.changeLocate("right", max_w, max_h);; } if (move == 4) { f.setMove(2); f.changeLocate("left", max_w, max_h);; } } } }
override public void execute() { if (f != null) { if (f.canmove(moving, max_w, max_h) == true) { if (up_down == 1) { f.setUp_Down(2); f.changeSize("add", max_w, max_h); } if (up_down == 2) { f.setUp_Down(1); f.changeSize("substract", max_w, max_h); } } } }
override public void execute(Figure f_, int max_w_, int max_h_) // выполнить передвижение { f = f_; max_w = max_w_; max_h = max_h_; if (f.canmove(moving, max_w, max_h) == true) { f.setMove(move); f.changeLocate(moving, max_w, max_h); } }
override public void execute(Figure f_, int max_w_, int max_h_) { f = f_; max_w = max_w_; max_h = max_h_; if (f.canmove(moving, max_w, max_h) == true) { f.setUp_Down(up_down); f.changeSize(moving, max_w, max_h); } }
public override bool canmove(string moving, int max_w, int max_h) { return(sticky.canmove(moving, max_w, max_h)); }