Loading fish.go→cell/fish/fish.go +8 −1 Original line number Diff line number Diff line package wator package fish // Fish is the representation for a fish. type Fish struct { Loading @@ -9,6 +9,13 @@ const ( fish = "·" // "f" // "🐟" ) // New creates a new fish with a given age. func New(age int) *Fish { return &Fish{ age: age, } } // String return the representation. func (f *Fish) String() string { return fish Loading fish_test.go→cell/fish/fish_test.go +1 −1 Original line number Diff line number Diff line package wator package fish import "testing" Loading shark.go→cell/shark/shark.go +9 −1 Original line number Diff line number Diff line package wator package shark // Shark is the representation for a shark. type Shark struct { Loading @@ -10,6 +10,14 @@ const ( shark = "O" // "S" // "🦈" ) // New creates a new shark. func New(age int) *Shark { return &Shark{ age: age, ate: 0, } } // String return the representation. func (s *Shark) String() string { var i string Loading shark_test.go→cell/shark/shark_test.go +1 −1 Original line number Diff line number Diff line package wator package shark import "testing" Loading water.go→cell/water/water.go +6 −1 Original line number Diff line number Diff line package wator package water // Water is an empty cell in the ocean. type Water struct { Loading @@ -9,6 +9,11 @@ const ( waterAge = -1 ) // New create new water. func New() *Water { return &Water{} } // String return the representation. func (w *Water) String() string { return water Loading Loading
fish.go→cell/fish/fish.go +8 −1 Original line number Diff line number Diff line package wator package fish // Fish is the representation for a fish. type Fish struct { Loading @@ -9,6 +9,13 @@ const ( fish = "·" // "f" // "🐟" ) // New creates a new fish with a given age. func New(age int) *Fish { return &Fish{ age: age, } } // String return the representation. func (f *Fish) String() string { return fish Loading
fish_test.go→cell/fish/fish_test.go +1 −1 Original line number Diff line number Diff line package wator package fish import "testing" Loading
shark.go→cell/shark/shark.go +9 −1 Original line number Diff line number Diff line package wator package shark // Shark is the representation for a shark. type Shark struct { Loading @@ -10,6 +10,14 @@ const ( shark = "O" // "S" // "🦈" ) // New creates a new shark. func New(age int) *Shark { return &Shark{ age: age, ate: 0, } } // String return the representation. func (s *Shark) String() string { var i string Loading
shark_test.go→cell/shark/shark_test.go +1 −1 Original line number Diff line number Diff line package wator package shark import "testing" Loading
water.go→cell/water/water.go +6 −1 Original line number Diff line number Diff line package wator package water // Water is an empty cell in the ocean. type Water struct { Loading @@ -9,6 +9,11 @@ const ( waterAge = -1 ) // New create new water. func New() *Water { return &Water{} } // String return the representation. func (w *Water) String() string { return water Loading