Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package skwer
- type atom struct {
- upperLeft Point
- color Color
- }
- type Atom interface {
- GetColor() (uint8)
- GetPosition() Point
- }
- func (s atom) GetPosition() Point {
- return s.upperLeft
- }
- func (s atom) GetColor() (uint8) {
- return s.color.GetColor()
- }
- func (s atom) GetSomething() (int) {
- return 12
- }
- func NewAtom(j int, i int, color Color) Atom {
- newPosition := NewPoint(j, i)
- return &atom{newPosition, color}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement