8queens.rb
def goto(obj, tile=nil)
        @x = obj.x
        @y = obj.y
        @mapx = tile.mapx
        @mapy = tile.mapy
        @tile = tile
        if @tile != nil
            @tile.occupy(self)
        end
    end
# move to some rect object
# optional: queen will occupy the tile

move to some rect object
optional: queen will occupy the tile
move to some rect object optional : queen will occupy the tile
def goto(obj, tile=nil)
        @x = obj.x
        @y = obj.y
        @mapx = tile.mapx
        @mapy = tile.mapy
        @tile = tile
        if @tile != nil
            @tile.occupy(self)
        end
    end
def goto ( obj , tile = nil ) @x = obj . x @y = obj . y @mapx = tile . mapx @mapy = tile . mapy @tile = tile if @tile != nil @tile . occupy ( self ) end end
move to some rect object
optional: queen will occupy the tile
move to some rect object optional : queen will occupy the tile
obj
tile