20 lines
314 B
Go
20 lines
314 B
Go
|
|
package fluid
|
||
|
|
|
||
|
|
type BoundaryDimensions struct {
|
||
|
|
X int
|
||
|
|
Y int
|
||
|
|
}
|
||
|
|
|
||
|
|
type Boundary struct {
|
||
|
|
Dimensions BoundaryDimensions
|
||
|
|
Cells []bool
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewBoundary(dimensions BoundaryDimensions) *Boundary {
|
||
|
|
b := &Boundary{
|
||
|
|
Dimensions: dimensions,
|
||
|
|
Cells: make([]bool, dimensions.X*dimensions.Y),
|
||
|
|
}
|
||
|
|
return b
|
||
|
|
}
|