After reading this and encountering a few more problems, I have some more questions. First of all, when I use a variable in a function like:
local function placePiece( Piece, x, y )
if canPlacePiece( Piece ) then
Piece.x = x
Piece.y = y
end
end
I am used to Java, where the piece’s x and y would not change, does this change the x and y?
Also, I am wondering about classes in Lua. Are they traditional classes or just lists of info? Can I create an instant of the class. I tried to create two pieces with the Piece:new method and when one began to affect another.