packagemt// A Dir represents a direction parallel to an axis.typeDiruint8const(EastDir=iota// +XAbove// +YNorth// +ZSouth// -ZBelow// -YWest// -XNoDir)// Opposite returns the Dir's opposite.// NoDir is its own opposite.func(dDir)Opposite()Dir{ifd>=NoDir{returnNoDir}return5-d}