Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. package skwer
  2.  
  3. type atom struct {
  4. upperLeft Point
  5. color Color
  6. }
  7.  
  8. type Atom interface {
  9. GetColor() (uint8)
  10. GetPosition() Point
  11. }
  12.  
  13. func (s atom) GetPosition() Point {
  14. return s.upperLeft
  15. }
  16.  
  17. func (s atom) GetColor() (uint8) {
  18. return s.color.GetColor()
  19. }
  20.  
  21. func (s atom) GetSomething() (int) {
  22. return 12
  23. }
  24.  
  25. func NewAtom(j int, i int, color Color) Atom {
  26. newPosition := NewPoint(j, i)
  27.  
  28. return &atom{newPosition, color}
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement