Major progress in introducing arbitrary boundaries! EDT in the house.
This commit is contained in:
19
fluid/boundary.go
Normal file
19
fluid/boundary.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user