Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/Global.-1.ttslua
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ function clueEntered(player, value)
return
end

-- Remove the newline, trim the clue, and convert to lowercase
value = value:gsub("\n", ""):match("%s*(.-)%s*$"):lower()
-- Remove the newline, trim the clue
value = value:gsub("\n", ""):match("%s*(.-)%s*$")

-- Parse the entered clue into its respective parts
local clue, number, error = getClueDetails(value)
Expand Down Expand Up @@ -628,8 +628,8 @@ function getClueDetails(processedClue)
end

local checks = {
"^(%a+)(%s*)(%d+)$",
"^(%a+)(%s+)(inf)$"
"^(.+)(%s*)(%d+)$",
"^(.+)(%s+)(inf)$"
}

for _, check in ipairs(checks) do
Expand All @@ -654,10 +654,10 @@ function getClueDetails(processedClue)
end

local checks = {
"^(%a+%-%a+)(%s*)(%d+)$",
"^(%a+%-%a+)(%s+)(inf)$",
"^(%a+)(%s*%-%s*)(%d+)$",
"^(%a+)(%s*%-%s*)(inf)$"
"^(.+%-.+)(%s*)(%d+)$",
"^(.+%-.+)(%s+)(inf)$",
"^(.+)(%s*%-%s*)(%d+)$",
"^(.+)(%s*%-%s*)(inf)$"
}

for _, check in ipairs(checks) do
Expand All @@ -681,8 +681,8 @@ function getClueDetails(processedClue)
end

local checks = {
"^(%a+%-%a+)(%s*%-%s*)(%d+)$",
"^(%a+%-%a+)(%s*%-%s*)(inf)$"
"^(.+%-.+)(%s*%-%s*)(%d+)$",
"^(.+%-.+)(%s*%-%s*)(inf)$"
}

for _, check in ipairs(checks) do
Expand Down Expand Up @@ -1909,4 +1909,4 @@ function analytics_gameEnd(winner)
analytics_sessionEnd(players)
end
end)
end
end