about summary refs log tree commit diff
path: root/src/challenge.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/challenge.go')
-rw-r--r--src/challenge.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/challenge.go b/src/challenge.go
index 1d0a210..3fb26d7 100644
--- a/src/challenge.go
+++ b/src/challenge.go
@@ -10,6 +10,7 @@ type Challenge struct {
 	FlagTries uint
 	Container string // this could, but is not required as well
 	Category string
+	Points int
 }
 
 // TODO: The name "Stripped" is a bit inaccurate now. Rename.
@@ -21,12 +22,14 @@ type StrippedChallenge struct {
 	FlagTries uint `json:"flagTries"`
 	ContainsLaunchable bool `json:"ContainsLaunchable"`
 	IPAddress string `json:"IPAddress"`
+	Points int `json:"points"`
 }
 
 type StatsStrippedChallenge struct {
 	Name string `json:"name"`
 	FoundFlag int64 `json:"foundFlag"`
 	FlagTries uint `json:"flagTries"`
+	Points int `json:"points"`
 }
 
 func stripChallenge(c Challenge) (StrippedChallenge) {
@@ -38,6 +41,7 @@ func stripChallenge(c Challenge) (StrippedChallenge) {
 		FlagTries: c.FlagTries,
 		ContainsLaunchable: c.Container != "",
 		IPAddress: getAddressForChallengeContainer(c.Container),
+		Points: c.Points,
 	}
 }
 
@@ -46,5 +50,6 @@ func stripChallengeForStatistics(c Challenge) (StatsStrippedChallenge) {
 		Name: c.Name,
 		FoundFlag: c.FoundFlag.Unix(),
 		FlagTries: c.FlagTries,
+		Points: c.Points,
 	}
 }