intial committ for mine-sweeper kata, the core logic is tooo imperative