summaryrefslogtreecommitdiff
path: root/bindings/lua/test_selfplay.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/lua/test_selfplay.lua')
-rw-r--r--bindings/lua/test_selfplay.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/bindings/lua/test_selfplay.lua b/bindings/lua/test_selfplay.lua
index 4be6c28..9209f52 100644
--- a/bindings/lua/test_selfplay.lua
+++ b/bindings/lua/test_selfplay.lua
@@ -2,9 +2,9 @@ require 'quackle'
function startUp(lexicon, alphabet, datadir)
- local lexicon = lexicon and lexicon or 'twl06'
- local alphabet = alphabet and alphabet or 'english'
- local datadir = datadir and datadir or '../../data'
+ local lexicon = lexicon or 'twl06'
+ local alphabet = alphabet or 'english'
+ local datadir = datadir or '../../data'
-- Set up the data manager
local dm = quackle.DataManager()
@@ -38,10 +38,12 @@ end
function getComputerPlayer(dm, name)
- local name = name and name or 'Speedy Player'
+ local name = name or 'Speedy Player'
+
local player, found = dm:computerPlayers():playerForName(name)
assert(found)
player = player:computerPlayer()
+
return player
end