public bool CheckAndSetPos(GenerateArmy army, int x, int y) { var tempX = MinX; var tempY = MinY; MinX = x; MinY = y; var canAdded = army.CheckSquad(this); MinX = canAdded ? MinX : tempX; MinY = canAdded ? MinY : tempY; return(canAdded); }
public bool CheckAndSetPos(GenerateArmy army, int x, int y) { var tempX = _xMin; var tempY = _yMin; _xMin = x; _yMin = y; var canAdded = army.CheckSquad(this); _xMin = canAdded ? _xMin : tempX; _yMin = canAdded ? _yMin : tempY; return(canAdded); }
public MyView(Context context) : base(context) { SetPadding(0, 0, 0, 0); paint = new Paint { Color = Color.Red }; paint.SetStyle(Paint.Style.Fill); borderPaint = new Paint(paint) { Color = Color.Cyan }; focusPaint = new Paint(paint) { Color = Color.Gray }; Army = new GenerateArmy(); }