This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dr.games.othello; | |
import dr.games.core.AbstractGame; | |
import dr.games.core.Game; | |
import dr.games.core.Outcome; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Convert a lua table into a lua syntactically correct string | |
function table_to_string(tbl) | |
local result = "{" | |
for k, v in pairs(tbl) do | |
-- Check the key type (ignore any numerical keys - assume its an array) | |
if type(k) == "string" then | |
result = result.."[\""..k.."\"]".."=" | |
end | |
-- Check the value type |