Add support for coin with grids

TODO: @wei2912 must create the graph generator