moveTop
moveTop<
T>(from,to,count?):T[]
Defined in: src/modules/pile/pile-array.ts:10
Move the top count items of from onto to, keeping their order — a
draw, or a run of cards moved as one. Moves fewer when from holds fewer;
count is truncated and clamped at 0. Both arrays change in place (index
0 is the bottom). Returns the moved items, bottom first.
With from === to the items are taken off and put back on, so the array is
unchanged.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T[]
T[]
count?
Section titled “count?”number = 1
Returns
Section titled “Returns”T[]