Skip to content

Commit

Permalink
Readd files
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Hobbs committed Feb 2, 2013
1 parent 6582b16 commit 181141f
Show file tree
Hide file tree
Showing 160 changed files with 20,438 additions and 0 deletions.
19 changes: 19 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1187.34">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Consolas; color: #323333}
</style>
</head>
<body>
<p class="p1">Christopher Hobbs</p>
<p class="p1">Peter Grypma</p>
<p class="p1">David Wu</p>
<p class="p1">Hizkia Mertadiwangsa</p>
</body>
</html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Assignments/Assignment 2/HW2_CMPT_385.doc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Assignments/Assignment 3/SourceCode.zip
Binary file not shown.
690 changes: 690 additions & 0 deletions COPYING

Large diffs are not rendered by default.

3,764 changes: 3,764 additions & 0 deletions GenericMenuNetwork.uml

Large diffs are not rendered by default.

Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Agenda_20120907.doc
Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Agenda_20120914.doc
Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Agenda_20120926.doc
Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Minutes_20120907.doc
Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Minutes_20120914.doc
Binary file not shown.
Binary file added Meetings/CMPT_385_Meeting_Minutes_20120920.doc
Binary file not shown.
Binary file added Meetings/HW 2 meeting oct 10 2012.doc
Binary file not shown.
Binary file added Missing Letters/1star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/2star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/3star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/4star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/5star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/GreenCheckbox.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions Missing Letters/LevelCompleteViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// LevelCompleteViewController.h
// Missing Letters
//
// Created by Team Red Panda on 2012-10-25.
// Copyright (c) 2012 Team Red Panda. All rights reserved.
//
// Code Standard:
// http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html
//
// Developed using iOS Documantation:
// http://developer.apple.com/library/ios/navigation/

#import <UIKit/UIKit.h>

@interface LevelCompleteViewController : UIViewController

//Place Holder
@property (strong,nonatomic)NSString *ML_importTotalGuessCount;
@property (strong,nonatomic)NSString *ML_importCorrectGuessCount;

@property (weak, nonatomic) IBOutlet UIImageView *ML_starImageView;
@property (weak, nonatomic) IBOutlet UILabel *ML_letterGradeView;

@property (weak, nonatomic) IBOutlet UILabel *ML_averageGrade;
- (NSString *)calculateLetterGrade:(int)score;
- (UIImage *)calculateStars:(int)score;

@end
117 changes: 117 additions & 0 deletions Missing Letters/LevelCompleteViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
//
// LevelCompleteViewController.m
// Missing Letters
//
// Created by Team Red Panda on 2012-10-25.
// Copyright (c) 2012 Team Red Panda. All rights reserved.
//
// Code Standard:
// http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html
//
// Developed using iOS Documantation:
// http://developer.apple.com/library/ios/navigation/

#import "LevelCompleteViewController.h"
#import "GameViewController.h"
#import "GameIO.h"

@interface LevelCompleteViewController ()

@end

@implementation LevelCompleteViewController

@synthesize ML_importCorrectGuessCount;
@synthesize ML_importTotalGuessCount;
@synthesize ML_starImageView;
@synthesize ML_letterGradeView;
@synthesize ML_averageGrade;

//This method will take the final grade (percentage) and return the appropriate letter grade
- (NSString *)calculateLetterGrade:(int)score
{
NSString *letterGrade;
switch (score)
{
case 88 ... 1000:
letterGrade = @"A";
break;
case 75 ... 87:
letterGrade = @"B";
break;
case 63 ... 74:
letterGrade = @"C";
break;
case 50 ... 62:
letterGrade = @"D";
break;
case -1000 ... 49:
letterGrade = @"F";
break;
default:
letterGrade = @"";
break;
}
return letterGrade;
}

//This method will take the fianl grade (percentage) and return the appropriate number of stars
- (UIImage *)calculateStars:(int)score
{
UIImage *stars;
switch (score)
{
case 88 ... 1000:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"5star" ofType:@"png"]];
break;
case 75 ... 87:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"4star" ofType:@"png"]];
break;
case 63 ... 74:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"3star" ofType:@"png"]];
break;
case 50 ... 62:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"2star" ofType:@"png"]];
break;
case 26 ... 49:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"1star" ofType:@"png"]];
break;
case -1000 ... 25:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"nostar" ofType:@"png"]];
break;
default:
stars = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"null" ofType:@"png"]];
break;
}
return stars;
}

- (void)viewDidLoad
{
[super viewDidLoad];

//Calculate end score percentage
int ML_endScore = (int)([ML_importCorrectGuessCount floatValue]/([ML_importTotalGuessCount floatValue]+1)*100);
//Update the user's statistics history
[GameIO updateUserAverageScore:ML_endScore forUser:[[NSUserDefaults standardUserDefaults]stringForKey:@"username"]];

//Display letter grade for this level
ML_letterGradeView.text = [self calculateLetterGrade:ML_endScore];
//Display star rating for this level
ML_starImageView.image = [self calculateStars:ML_endScore];
//Display user's average grade for all levels
ML_averageGrade.text = [self calculateLetterGrade:[GameIO getUserAverageScoreForUser:[[NSUserDefaults standardUserDefaults] stringForKey:@"username"]]];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (void)viewDidUnload {
[self setML_starImageView:nil];
[self setML_letterGradeView:nil];
[super viewDidUnload];
}
@end
Binary file added Missing Letters/MLAbout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/MLIcon_regular.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/MLIcon_retina.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Missing Letters/MLInGame_retina.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 181141f

Please sign in to comment.