begin hexagonal grid code