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.

11
21
22
34
56634
5347
547
8477
899477
99977
7
10101010
10111212
10111112
11
131111111114
1313111114
151111
16161511111117171818
161111171818

Number of pools: 18
The largest pool consists of 17 fields being marked with number 11.