public static void Main(string[] args) { var solver = new LakeCounter (new string[]{ "W" }); Console.WriteLine (solver.count ()); solver = new LakeCounter (new string[]{ "W........WW.", ".WWW.....WWW", "....WW...WW.", ".........WW.", ".........W..", ".........W..", "..W......W..", ".W.W.....WW.", "W.W.W.....W.", ".W.W......W.", "..W.......W."}); Console.WriteLine (solver.count ()); solver = new LakeCounter (new string[]{ "W........WW.", ".W.W.....WWW", "....WW...WW.", ".........WW.", ".........W..", ".........W..", "..W.........", ".W.W.....WW.", "W.W.W.....W.", ".W.W......W.", "..W.......W."}); Console.WriteLine (solver.count ()); }
public static void Main(string[] args) { var solver = new LakeCounter(new string[] { "W" }); Console.WriteLine(solver.count()); solver = new LakeCounter(new string[] { "W........WW.", ".WWW.....WWW", "....WW...WW.", ".........WW.", ".........W..", ".........W..", "..W......W..", ".W.W.....WW.", "W.W.W.....W.", ".W.W......W.", "..W.......W." }); Console.WriteLine(solver.count()); solver = new LakeCounter(new string[] { "W........WW.", ".W.W.....WWW", "....WW...WW.", ".........WW.", ".........W..", ".........W..", "..W.........", ".W.W.....WW.", "W.W.W.....W.", ".W.W......W.", "..W.......W." }); Console.WriteLine(solver.count()); }