From 9c8dff07f2c059b77a2fe0f2ace0ca009146bad6 Mon Sep 17 00:00:00 2001 From: hanemile Date: Fri, 28 Sep 2018 18:02:30 +0200 Subject: defined a slice storing the stars --- main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e3af135..5a59c25 100644 --- a/main.go +++ b/main.go @@ -22,5 +22,12 @@ type star struct{ } func main() { - fmt.Println("Hello World") + // stars_arr is a slice storing the stars + stars_arr := []star{ + star{coord{1.0, 1.0}, force{0, 0}, 1000000}, + star{coord{3.0, 2.5}, force{0, 0}, 1000000}, + star{coord{1.0, 4.5}, force{0, 0}, 1000000}, + } + + fmt.Println(stars_arr) } -- cgit 1.4.1