public SystemView MoveTarget([FromQuery] int?dx, [FromQuery] int?dy, [FromQuery] int treeSamplesCount, [FromQuery] int treeDepth, [FromQuery] float gama, [FromQuery] float c) { treeSamplesCount = Math.Clamp(treeSamplesCount, 10, 1000); treeDepth = Math.Clamp(treeDepth, 1, 5); gama = Math.Clamp(gama, 0, 1); c = Math.Clamp(c, 0, 1); Models.System s = GetSystem(); s.AdvanceSystem(dx, dy, treeSamplesCount, treeDepth, gama, c); return(SetSystem(s)); }