players module

This commit is contained in:
Jill 2022-10-16 23:39:22 +03:00
parent 85d883a144
commit ede5d69c8c
1 changed files with 27 additions and 0 deletions

27
stdlib/players.lua Normal file
View File

@ -0,0 +1,27 @@
local max_pn = 8
---@type Player[]
P = {}
-- for type declarations
---@type Player
P1 = nil
---@type Player
P2 = nil
---@type Player
P3 = nil
---@type Player
P4 = nil
---@type Player
P5 = nil
---@type Player
P6 = nil
---@type Player
P7 = nil
---@type Player
P8 = nil
for pn = 1, max_pn do
local player = SCREENMAN('PlayerP' .. pn)
oat['P' .. pn] = player
P[pn] = player
end