20 lines
270 B
Go
20 lines
270 B
Go
package entities
|
|
|
|
type Vector2 struct {
|
|
X, Y float64
|
|
}
|
|
|
|
type Puck struct {
|
|
Position Vector2
|
|
Velocity Vector2
|
|
Radius float64
|
|
}
|
|
|
|
func NewPuck(x, y float64) *Puck {
|
|
return &Puck{
|
|
Position: Vector2{X: x, Y: y},
|
|
Velocity: Vector2{X: 0, Y: 0},
|
|
Radius: 10,
|
|
}
|
|
}
|