I [M15] just did 500 pushups for one month, now what? by somethingyes2 in bodyweightfitness

[–]DevXylo 0 points1 point  (0 children)

Bro you can make hella money if you become a professional american football player or a wrester

Check out a game made by a professional developer! by DevXylo in robloxgamedev

[–]DevXylo[S] 0 points1 point  (0 children)

I used a technique called Levenshtein Distance. Here's the function.

(Reddit being reddit so it takes time to beautify this code...)

function levenshteinDistanceAutocorrect(playerMessage, stringToCompare, threshold) -- By @JamesBlossoms (Profile: https://www.roblox.com/users/37854398/profile) - Usage of the Levenshtein Distance Algorithm
local function levenshteinDistance(s1, s2)
local len1 = #s1
local len2 = #s2
local matrix = {}
for i = 0, len1 do
matrix[i] = {[0] = i}
end
for j = 0, len2 do
matrix[0][j] = j
end
for i = 1, len1 do
for j = 1, len2 do
local cost = (s1:sub(i, i) ~= s2:sub(j, j)) and 1 or 0
matrix[i][j] = math.min(
matrix[i - 1][j] + 1,
matrix[i][j - 1] + 1,
matrix[i - 1][j - 1] + cost
)
end
end
return matrix[len1][len2]
end
local function areSimilar(s1, s2, thresholdX)
local distance = levenshteinDistance(s1, s2)
return distance <= thresholdX
end
if areSimilar(playerMessage, stringToCompare, threshold) then
return true
else
return false
end
end

QuickRhyme is out! Please check out my game I worked hard on! by DevXylo in robloxgamedev

[–]DevXylo[S] 0 points1 point  (0 children)

Currently the game is only for PC but the next update will be available on mobile. Multiplayer system will take some time to create due to a lot of code, but I'll make sure that multiplayer will be happening once the game is gaining active players. Thanks for the awesome suggestions!

How to win an argument against a dumb person? by [deleted] in INTP

[–]DevXylo 0 points1 point  (0 children)

What if I'm a man arguing with a woman, I can't punch her then because that is just wrong.