mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
test: simplify mapped test update
This commit is contained in:
parent
e276863b2d
commit
1d5d3aed8c
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ local function updatePercentageOfPeople(percent: number): ({ Person }) -> { Pers
|
|||
local nextState = table.clone(state)
|
||||
for index, person in state do
|
||||
if math.random() < percent then
|
||||
nextState[index] = mapper(person)
|
||||
nextState[index] = table.clone(person)
|
||||
end
|
||||
end
|
||||
return nextState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue