public void RemoveTaskCompletetion(CompletedTask completion)
        {
            UserProfile user = completion.User;

            //Take points away from user total score
            user.TotalScore -= completion.Task.numPoints;

            //Take points away from approriate score category
            switch (completion.Task.argPath)
            {
                case "Attendance":
                    user.AttendancePoints -= completion.Task.numPoints;
                    break;
                case "Cooperation":
                    user.CooperationPoints -= completion.Task.numPoints;
                    break;
                case "Cross-Curricular":
                    user.CrossCurricularPoints -= completion.Task.numPoints;
                    break;
                case "Puzzle":
                    user.PuzzlePoints -= completion.Task.numPoints;
                    break;
                case "Story":
                    user.StoryPoints -= completion.Task.numPoints;
                    break;
                default:
                    break;
            }

            //Remove user from the task's completed player list
            completion.Task.completedTasks.Remove(completion);

            //Remove task from user's completed task list
            user.TasksCompleted.Remove(completion);
        }
        public void TaskCompletion(Task task, UserProfile user)
        {
            CompletedTask completion = new CompletedTask();
            completion.DateCompleted = DateTime.Now;
            completion.Freeze = false;
            completion.Task = task;
            completion.PenaltyPoints = 0;
            completion.BonusPoints = 0;

            //Set milestone true/false
            if (completion.Task.completedTasks.Count < completion.Task.milestoneNumPlayers)
                completion.MilestoneAcheivement = true;
            else
                completion.MilestoneAcheivement = false;

            //Add user to the tasks's completion list
            task.completedTasks.Add(completion);

            //Add points to user profile total score
            user.TotalScore += task.numPoints;

            //Add points to appropriate argpath for user
            switch (task.argPath)
            {
                case "Attendance":
                    user.AttendancePoints += task.numPoints;
                    break;
                case "Cooperation":
                    user.CooperationPoints += task.numPoints;
                    break;
                case "Cross-Curricular":
                    user.CrossCurricularPoints += task.numPoints;
                    break;
                case "Puzzle":
                    user.PuzzlePoints += task.numPoints;
                    break;
                case "Story":
                    user.StoryPoints += task.numPoints;
                    break;
                default:
                    break;
            }

            completion.PointsReceived = task.numPoints;
        }
        public void FreezeTaskCompletetion(CompletedTask completion)
        {
            completion.Freeze = true;

            //Take points away from user total score
            completion.User.TotalScore -= completion.Task.numPoints;

            //Take points away from approriate score category
            switch (completion.Task.argPath)
            {
                case "Attendance":
                    completion.User.AttendancePoints -= completion.Task.numPoints;
                    break;
                case "Cooperation":
                    completion.User.CooperationPoints -= completion.Task.numPoints;
                    break;
                case "Cross-Curricular":
                    completion.User.CrossCurricularPoints -= completion.Task.numPoints;
                    break;
                case "Puzzle":
                    completion.User.PuzzlePoints -= completion.Task.numPoints;
                    break;
                case "Story":
                    completion.User.StoryPoints -= completion.Task.numPoints;
                    break;
                default:
                    break;
            }
        }