def solid?(x, y)
@x.between?(x, x + 20) and @y.between?(y, y + 20)
end
def solid?(x, y)
x.between?(@x, @x + 20) and y.between(@y, @y + 20)
end
x/y
and @x/@y
are from just looking at these two lines, but:x.between?(@x, @x + 20)
@x.between?(x, x + 20)
x.between?(@x, @x + 20)
@x.between?(x  20, x)
Map
class, then there usually shouldn't be a @x/@y, just maybe a @width/@height?
@x
and @y
are the x and y coordinates of the tile in the Map class. Sorry. 20  40



40
0  20



20
solid?
method returns true/false when it's next to a map tile.solid?
method is only checking for a map tile in one direction right now.Powered by mwForum 2.29.7 © 19992015 Markus Wichitill