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
Brainfuck Interpreter (Lua) [reposted]
finding volume of pyramids (for me, but feel free to use)
BasicTablePrinterV2
test
Monty Hall Problem Simulated
ok
Simple Lua primality test
PAID HACK PuBG
python like round function in lua
Roots without the math library in Lua