Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 262 Bytes
require 'location'
class Grid
def initialize(size)
@size = size
end
def locations
[].tap do |locations|
(1..@size).each do |x|
(1..@size).each do |y|
locations << Location.new(x, y)
end
end
end
end
end