First pass at documentations.

This commit is contained in:
sm
2014-04-14 00:26:41 -07:00
parent 0cf0957d73
commit faacfe7fd9
12 changed files with 172 additions and 49 deletions
+3
View File
@@ -4,6 +4,7 @@ import (
v "bitbucket.org/hackerbots/vector"
)
// Splosion embodies an explosion.
type Splosion struct {
Id string `json:"id"`
Position v.Point2d `json:"position"`
@@ -11,10 +12,12 @@ type Splosion struct {
Lifespan int `json:"-"`
}
// Tick decrements the lifespan of said Splosion.
func (s *Splosion) Tick() {
s.Lifespan--
}
// Alive determines if this Splosion is still relevant.
func (s *Splosion) Alive() bool {
return s.Lifespan > 0
}