mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Update game module and dependents for the 2019 game.
This commit is contained in:
@@ -28,6 +28,7 @@ type EventSettings struct {
|
||||
PlcAddress string
|
||||
AdminPassword string
|
||||
ReaderPassword string
|
||||
HabDockingThreshold int
|
||||
}
|
||||
|
||||
const eventSettingsId = 0
|
||||
@@ -45,6 +46,7 @@ func (database *Database) GetEventSettings() (*EventSettings, error) {
|
||||
eventSettings.ApTeamChannel = 157
|
||||
eventSettings.ApAdminChannel = 0
|
||||
eventSettings.ApAdminWpaKey = "1234Five"
|
||||
eventSettings.HabDockingThreshold = 15
|
||||
|
||||
err = database.eventSettingsMap.Insert(eventSettings)
|
||||
if err != nil {
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestEventSettingsReadWrite(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, EventSettings{Id: 0, Name: "Untitled Event", NumElimAlliances: 8, SelectionRound2Order: "L",
|
||||
SelectionRound3Order: "", TBADownloadEnabled: true, ApTeamChannel: 157, ApAdminChannel: 0,
|
||||
ApAdminWpaKey: "1234Five"}, *eventSettings)
|
||||
ApAdminWpaKey: "1234Five", HabDockingThreshold: 15}, *eventSettings)
|
||||
|
||||
eventSettings.Name = "Chezy Champs"
|
||||
eventSettings.NumElimAlliances = 6
|
||||
|
||||
@@ -25,7 +25,7 @@ func TestMatchResultCrud(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, matchResult, matchResult2)
|
||||
|
||||
matchResult.BlueScore.AutoRuns = 12
|
||||
matchResult.BlueScore.RobotEndLevels = [3]int{3, 3, 3}
|
||||
db.SaveMatchResult(matchResult)
|
||||
matchResult2, err = db.GetMatchResultForMatch(254)
|
||||
assert.Nil(t, err)
|
||||
|
||||
Reference in New Issue
Block a user