Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheats and Whistles #244

Merged
merged 4 commits into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Data/Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Compile Remove="Migrations\20181006003838_CreateIdentitySchema.cs" />
<Compile Remove="Migrations\20190111053724_EventId.cs" />
<Compile Remove="Migrations\20190111053724_EventId.Designer.cs" />
<Compile Remove="Migrations\20190214050904_CheatsAndWhistles.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 22 additions & 0 deletions Data/DataModel/Puzzle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public Puzzle (Puzzle source)
IsPuzzle = source.IsPuzzle;
IsMetaPuzzle = source.IsMetaPuzzle;
IsFinalPuzzle = source.IsFinalPuzzle;
IsCheatCode = source.IsCheatCode;
SolveValue = source.SolveValue;
HintCoinsForSolve = source.HintCoinsForSolve;
Token = source.Token;
Expand All @@ -33,6 +34,9 @@ public Puzzle (Puzzle source)
IsGloballyVisiblePrerequisite = source.IsGloballyVisiblePrerequisite;
MinPrerequisiteCount = source.MinPrerequisiteCount;
MinutesToAutomaticallySolve = source.MinutesToAutomaticallySolve;
MinutesOfEventLockout = source.MinutesOfEventLockout;
MaxAnnotationKey = source.MaxAnnotationKey;
SupportEmailAlias = source.SupportEmailAlias;
}

/// <summary>
Expand Down Expand Up @@ -67,6 +71,11 @@ public Puzzle (Puzzle source)
/// </summary>
public bool IsFinalPuzzle { get; set; } = false;

/// <summary>
/// True if this puzzle is a "cheat code" (nee "Fast Forward") that should impact standings
/// </summary>
public bool IsCheatCode { get; set; }

/// <summary>
/// The solve value
/// </summary>
Expand Down Expand Up @@ -111,6 +120,11 @@ public Puzzle (Puzzle source)
/// </summary>
public int? MinutesToAutomaticallySolve { get; set; } = null;

/// <summary>
/// How long to lock solvers out of the rest of the event
/// </summary>
public int MinutesOfEventLockout { get; set; }

/// <summary>
/// Some puzzles let teams store annotations describing their ongoing work, so they can share those
/// with their teammates. However, we don't want to let teams store arbitrary annotation data,
Expand All @@ -137,6 +151,10 @@ public Puzzle (Puzzle source)
/// </summary>
public string SupportEmailAlias { get; set; }

//
// WARNING: If you add new properties add them to the constructor as well so importing will work.
//

/// <summary>
/// File for the main puzzle (typically a PDF containing the puzzle)
/// </summary>
Expand Down Expand Up @@ -199,5 +217,9 @@ public IEnumerable<ContentFile> SolveTokenFiles
}

public virtual List<Submission> Submissions { get; set; }

//
// WARNING: If you add new properties add them to the constructor as well so importing will work.
//
}
}
Loading