From 1cb7327e2d79bd0c7d1be08d1c301148db87292f Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Sat, 14 Mar 2020 22:47:55 +1100 Subject: [PATCH] Init project with a zombie model --- .gitignore | 1 + README.md | 2 ++ models/zombie.go | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 models/zombie.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/README.md b/README.md new file mode 100644 index 0000000..093dd09 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Zombie + diff --git a/models/zombie.go b/models/zombie.go new file mode 100644 index 0000000..73d992c --- /dev/null +++ b/models/zombie.go @@ -0,0 +1,18 @@ +package models + +// Zombie presents a zombie object +type Zombie struct { + Dimension Dimension + Coordinate Coordinate +} + +// Dimension presents the n x n grid +type Dimension struct { + GridLength int +} + +// Coordinate presents the location in the grid of the zombie +type Coordinate struct { + XAxis int + YAxis int +} \ No newline at end of file