Home | History | Annotate | Download | only in play

Lines Matching defs:Field

11 // Field represents a two-dimensional field of cells.
12 type Field struct {
17 // NewField returns an empty field of the specified width and height.
18 func NewField(w, h int) *Field {
23 return &Field{s: s, w: w, h: h}
27 func (f *Field) Set(x, y int, b bool) {
32 // If the x or y coordinates are outside the field boundaries they are wrapped
34 func (f *Field) Alive(x, y int) bool {
43 func (f *Field) Next(x, y int) bool {
62 a, b *Field
80 // Update the state of the next field (b) from the current field (a).
110 fmt.Print("\x0c", l) // Clear screen and print field.