miamiruby / tdd_ocean

Find all ocean cells

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TDD Ocean

Given as input:
1. A map which is an array of strings of same lengths where "L" indicates land and "W" indicates water
2. a coordinate marking a point in the ocean

The Challenge:
Find and mark the ocean in the map by changing appropriate W's to O's.

An ocean coordinate is defined to be any coordinate directly adjacent to any other ocean coordinate.

def find_ocean(map, x, y)
end

bundle install
rspec

About

Find all ocean cells


Languages

Language:Ruby 100.0%