src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

cell.go (243B)


      1 package cell
      2 
      3 import (
      4 	"code.dwrz.net/src/pkg/minotaur/maze/direction"
      5 )
      6 
      7 type Cell uint8
      8 
      9 func (c Cell) HasDirection(d direction.Direction) bool {
     10 	return c&(1<<d) != 0
     11 }
     12 
     13 func (c *Cell) SetDirection(d direction.Direction) {
     14 	*c |= 1 << d
     15 }