1
0
mirror of https://github.com/MADTeacher/go_basics.git synced 2025-11-23 21:34:47 +02:00
Files
go_basics/part_3/3.6/golang/factory/shape/shape.go
2025-06-04 18:38:52 +03:00

33 lines
406 B
Go

package shape
type Point struct {
X int
Y int
}
type shape struct {
name string
center Point
color string
}
func (s *shape) SetColor(color string) {
s.color = color
}
func (s *shape) GetColor() string {
return s.color
}
func (s *shape) GetName() string {
return s.name
}
func (s *shape) MoveCenter(point Point) {
s.center = point
}
func (s *shape) GetCenter() Point {
return s.center
}