public static CreateChallenge ( string name, string description, int points, bool persistent, System.DateTime start, int durationInDays, Statistic statistic, float requirement ) : int | ||
name | string | Challenge Name. |
description | string | Challenge Description. |
points | int | Points to be awarded upon completion of the Challenge. |
persistent | bool | True if the Challenge is persistent, false otherwise. |
start | System.DateTime | Time at which the challenge should begin. |
durationInDays | int | Number of days that the challenge should be active. |
statistic | Statistic | Statistic on which the Challenge is based. |
requirement | float | Statistic value required to complete the challenge. |
return | int |
public static int CreateChallenge(string name, string description, int points, bool persistent,
DateTime start, int durationInDays, Statistic statistic, float requirement)
{
Challenge newChallenge = new Challenge(name, description, points, persistent,
start, durationInDays, statistic, requirement);
int id = ChallengeDAO.CreateNewChallenge(newChallenge);
return id;
}