Add the concept of commands to the world and executing them
This commit is contained in:
parent
013a69fa63
commit
e5d5d123a6
6 changed files with 163 additions and 19 deletions
|
@ -1,6 +1,15 @@
|
|||
package game
|
||||
|
||||
type Position struct {
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
// Vector desribes a 3D vector
|
||||
type Vector struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Z float64 `json:"z"`
|
||||
}
|
||||
|
||||
// Add adds one vector to another
|
||||
func (v *Vector) Add(v2 Vector) {
|
||||
v.X += v2.X
|
||||
v.Y += v2.Y
|
||||
v.Z += v2.Z
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue