From 83537a94d26509be51e4458e6c9c09df5970de93 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 14 Aug 2018 23:24:40 +0200 Subject: Add submit functionality for flags, and keep track of wrong tries --- src/challenge.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/challenge.go') diff --git a/src/challenge.go b/src/challenge.go index a1f9893..38cffee 100644 --- a/src/challenge.go +++ b/src/challenge.go @@ -4,6 +4,8 @@ type Challenge struct { Name string Description string Flag string // this should never leave the server + FoundFlag bool + FlagTries uint Container string // this could, but is not required as well Category string } @@ -12,6 +14,7 @@ type StrippedChallenge struct { Name string `json:"name"` Description string `json:"description"` Category string `json:"category"` + FoundFlag bool `json:"foundFlag"` } func stripChallenge(c Challenge) (StrippedChallenge) { @@ -19,5 +22,6 @@ func stripChallenge(c Challenge) (StrippedChallenge) { Name: c.Name, Description: c.Description, Category: c.Category, + FoundFlag: c.FoundFlag, } } -- cgit 1.4.1