diff options
author | David McMackins II <contact@mcmackins.org> | 2017-08-12 15:12:29 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2017-08-12 15:12:29 -0500 |
commit | 716f4b92090de5c2b6c57bd6e185147433ee37fe (patch) | |
tree | ea246f557c598c4d9e7aca6a38e32b3af812397c | |
parent | ef7f7d21fc959c67b33650d1228ea5dce68fcb2f (diff) |
Remove redundant updateall loops
-rw-r--r-- | serverthread.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/serverthread.lua b/serverthread.lua index 3076ded..790ca94 100644 --- a/serverthread.lua +++ b/serverthread.lua @@ -335,9 +335,7 @@ function Server:_process() self._selected = self._pieces[i] self._socks[this]:send(AFFIRMATIVE) - for _,queue in ipairs(self._updatequeue) do - queue:insert('SELECTED ' .. i) - end + self:_updateall({'SELECTED ' .. i}) end elseif line == 'DESELECT' then if self._turn ~= this then @@ -346,9 +344,7 @@ function Server:_process() self._selected = nil self._socks[this]:send(AFFIRMATIVE) - for _,queue in ipairs(self._updatequeue) do - table.insert(queue, 'DESELECTED') - end + self:_updateall({'DESELECTED'}) end elseif (line:startswith('TRYMOVE') or line:startswith('TRYSPLIT') |