This application generates on board 20 x 20 random fields where water is spilt. Then counts the number of pools - fields with spilt water that touch each other, prints their number and determines which pool is the largest one (shown highlighted).

In case of more pools with the same maximal size that one with the lowest number is highlighted. Isolated fields are removed from board.

1223
11234
244
5
65
66665
6577
557
77
7777
87
8
99
10101011
101111
1210
121212
121212121213
121314
14

Number of pools: 14
The largest pool consists of 10 fields being marked with number 7.