Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

autochess

function AddAChessToChessPool(chess)
    local maxcount = 1

    if string.find(chess,'11') ~= nil and (string.find(chess,'tp') ~= nil or string.find(chess,'eh') ~= nil) then
	    chess = string.sub(chess,1,-3)
        maxcount = 4
    

    elseif string.find(chess,'1') ~= nil and (string.find(chess,'tp') ~= nil or string.find(chess,'eh') ~= nil) then
        chess = string.sub(chess,1,-2)
        maxcount = 2

    

    elseif string.find(chess,'11') ~= nil then
	    chess = string.sub(chess,1,-3)
	    maxcount = 9
    

    elseif string.find(chess,'1') ~= nil then
	    chess = string.sub(chess,1,-2)
	    maxcount = 3
    end
    
    return chess, maxcount
end
    

a = 'chess_cm11'

print(AddAChessToChessPool('chess_cm11'))
print(AddAChessToChessPool('chess_cm1'))
print(AddAChessToChessPool('chess_cm'))
print(AddAChessToChessPool('chess_eh11'))
print(AddAChessToChessPool('chess_eh1'))
print(AddAChessToChessPool('chess_eh'))
print(AddAChessToChessPool('chess_ld11'))
print(AddAChessToChessPool('chess_ld1'))
print(AddAChessToChessPool('chess_ld'))

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.