1
0
mirror of https://github.com/MADTeacher/go_basics.git synced 2025-11-29 05:36:55 +02:00

отредактирована 3 глава

This commit is contained in:
Stanislav Chernyshev
2025-06-04 18:38:52 +03:00
parent 70656cfad8
commit f97178b439
64 changed files with 1751 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
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
}