-- Compiled with roblox-ts v1.2.7 local TS = _G[script] local TicTacToeState = TS.import(script, script.Parent.Parent, "enum", "TicTacToeState").TicTacToeState --[[ * * Output used in testing this library, has no actual * useful functionality. ]] local TicTacToeTestOutput do TicTacToeTestOutput = setmetatable({}, { __tostring = function() return "TicTacToeTestOutput" end, }) TicTacToeTestOutput.__index = TicTacToeTestOutput function TicTacToeTestOutput.new(...) local self = setmetatable({}, TicTacToeTestOutput) return self:constructor(...) or self end function TicTacToeTestOutput:constructor() self.movesMade = 0 self.gamesStarted = 0 self.gamesEnded = 0 self.xWins = 0 self.oWins = 0 self.draws = 0 end function TicTacToeTestOutput:onMove() self.movesMade += 1 end function TicTacToeTestOutput:onGameOver(g) self.gamesEnded += 1 local state = g:getState() if state == TicTacToeState.DRAW then self.draws += 1 elseif state == TicTacToeState.X_WON then self.xWins += 1 elseif state == TicTacToeState.O_WON then self.oWins += 1 end end function TicTacToeTestOutput:onGameStart() self.gamesStarted += 1 end function TicTacToeTestOutput:getMovesMade() return self.movesMade end function TicTacToeTestOutput:getGamesStarted() return self.gamesStarted end function TicTacToeTestOutput:getGamesEnded() return self.gamesEnded end function TicTacToeTestOutput:getXWins() return self.xWins end function TicTacToeTestOutput:getOWins() return self.oWins end function TicTacToeTestOutput:getDraws() return self.draws end end return { TicTacToeTestOutput = TicTacToeTestOutput, }