ted/model.go

33 lines
519 B
Go
Raw Normal View History

/**
* The model.
*/
package main
/**
2015-03-24 02:12:40 +00:00
* An abstract model interface. At a minimum, models must be read only.
*/
type Model interface {
/**
2015-03-24 02:12:40 +00:00
* The dimensions of the model (height, width).
*/
2015-03-24 02:12:40 +00:00
Dimensions() (int, int)
/**
* Returns the value of a cell.
*/
CellValue(r, c int) string
}
// A read/write model.
type RWModel interface {
Model
// Resize the model.
Resize(newRow, newCol int)
// Sets the cell value
SetCellValue(r, c int, value string)
}