-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest.lua
50 lines (28 loc) · 1.4 KB
/
test.lua
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local Map = require "map"
local m = Map:new {
x = 512,
y = 512,
radius = 10,
}
print("-----")
print("10000 enter [1], [1], The number of units within the radius is: "..#m:enter(10000, 1, 1))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10001 enter [10], [10], The number of units within the radius is: "..#m:enter(10001, 10, 10))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10002 enter [25], [25], The number of units within the radius is: "..#m:enter(10002, 25, 25))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10001 move to [15], [15], The number of units within the radius is: "..#m:move(10001, 15, 15))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10000 leave from [1], [1], The number of units within the radius is: "..#m:leave(10000))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10001 leave from [15], [15], The number of units within the radius is: "..#m:leave(10001))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")
print("10002 leave from [25], [25], The number of units within the radius is: "..#m:leave(10002))
print("The total number of people in the map is: "..m:members())m:dumps()
print("-----")