From d2e8fdc35265aef735c7fa4e00007bd3c72cd605 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Sat, 14 Mar 2020 23:44:20 +1100 Subject: [PATCH] Add creature model --- models/creature.go | 6 ++++++ models/zombie.go | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 models/creature.go diff --git a/models/creature.go b/models/creature.go new file mode 100644 index 0000000..dd49322 --- /dev/null +++ b/models/creature.go @@ -0,0 +1,6 @@ +package models + +// Creature represents the normal creature +type Creature struct { + Coordinate Coordinate +} diff --git a/models/zombie.go b/models/zombie.go index 3a780cd..27ca6dc 100644 --- a/models/zombie.go +++ b/models/zombie.go @@ -6,13 +6,13 @@ const ( minimumValueOnAXis = 0 ) -// Zombie presents a zombie object +// Zombie represents a zombie object type Zombie struct { GridSize int Coordinate Coordinate } -// Coordinate presents the location in the grid of the zombie +// Coordinate represents the location in the grid of the zombie type Coordinate struct { XAxis int YAxis int