Commit 61ac62b9 authored by Boris Mühmer's avatar Boris Mühmer
Browse files

changed shark api

parent 7da5310a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,10 +11,10 @@ const (
)

// New creates a new shark.
func New(age int) *Shark {
func New(age, ate int) *Shark {
	return &Shark{
		age: age,
		ate: 0,
		ate: ate,
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ func (o *Ocean) populateSharks(w *Wator) error {
			switch o.Cells[p].(type) {
			case Celler:
				a := rand.Intn(w.BreedShark)
				s := shark.New(a)
				s := shark.New(a, 0)
				o.Cells[p] = s
				o.Hunters[p] = s
				done = true