-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdoTheL_0.lua
More file actions
38 lines (27 loc) · 822 Bytes
/
doTheL_0.lua
File metadata and controls
38 lines (27 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Message = {}
Message.__index = Message
function Message.new(letter)
local ply = {}
setmetatable(ply,Message)
ply.letter = letter
return ply
end
function Message:getL()
while(true)do
local pleaseGiveMeTheRightLetterLowerCase = math.random(97,122)
local pleaseGiveMeTheRightLetterUpperCase = math.random(65,90)
if(string.char(pleaseGiveMeTheRightLetterLowerCase) == 'l' and string.char(pleaseGiveMeTheRightLetterUpperCase) == 'L') then
return 'l','L'
end
end
end
function Message:VerifyIfisEqualL(letter)
local lowerL,upperL = table.unpack(letter)
local l,L = self:getL()
if( lowerL == 'l' and upperL == 'L') then
return self:getL()
end
end
local myMessage = Message.new()
local _,__ = myMessage:VerifyIfisEqualL({myMessage:getL()})
print(__)