Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
personal use
local territories = 29 -- Change this local tpp = 10 -- Territories per person -- Don't worry about the code below -- local t = {} local player = 1 local u = 0 local function random(x, y) u = u + 1 if x ~= nil and y ~= nil then return math.floor(x +(math.random(math.randomseed(os.time()+u))*999999 %y)) else return math.floor((math.random(math.randomseed(os.time()+u))*1000)) end end for i = 1, territories do table.insert(t, i) end for i = 1, territories do local number = random(1, #t) print("Player "..player..": ".. t[number]) table.remove(t, number) if i%tpp == 0 then player = player + 1 print("") end end
run
|
edit
|
history
|
help
0
Binary to Integers / Integers to Binary
Conta valores acima da média - LUA
Simple Lua primality test
kraft1c
123
roulette
10 Line challenge
Truly random numbers (Lua)
Hello 2
Enums in Lua (library)