Now I want to use a queue in order to "save" the movement inside there and pop every command. Though, after reading this I thought I had to use a table inside a table. So some questions have been raised.
a)If I do understand well, I can create a wotmudmapper.queue={} to start a queue.
b)How do i refer to a function for queue? Is the following enough?
c)
Does that mean that I may have to change the values of first and last, if, let's say the queue is empty?If you use this structure in a strict queue discipline, calling only pushright and popleft, both first and last will increase continually. However, because we represent arrays in Lua with tables, you can index them either from 1 to 20 or from 16,777,216 to 16,777,236. Moreover, because Lua uses double precision to represent numbers, your program can run for two hundred years, doing one million insertions per second, before it has problems with overflows.