Mahjong Connect game with Hex tiles. Connect two identical stones to a path with no…