Skip to content

Commit

Permalink
Finished merging
Browse files Browse the repository at this point in the history
Merged
  • Loading branch information
Marcus Michalske committed Mar 18, 2012
1 parent 2c9d772 commit db157ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions Classes/DrawViewController.m
Expand Up @@ -26,13 +26,9 @@ -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
CGPoint touchPoint = [touch locationInView:problemView];

CGPoint hitbox = [problemView isHitbox:touchPoint];
<<<<<<< HEAD
if (!CGPointEqualToPoint(hitbox, CGPointMake(-1.0f, -1.0f))) {
=======
//NSLog(@"StartB");
//NSLog(@"Before test: %d",[problemView getArrowStackCount]);
if (!CGPointEqualToPoint(hitbox, CGPointMake(-1.0f, -1.0f)) && ([problemView getProblemArrowCount] > [problemView getArrowStackCount])) {
>>>>>>> Cleaned arrow code
[problemView startArrow:hitbox];
if ([problemView getArrowStackCount] == 1)
{
Expand All @@ -53,25 +49,18 @@ -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchPoint = [touch locationInView:problemView];
<<<<<<< HEAD

=======
//NSString *arrowCount = (NSString *) [problemView getProblemArrowCount]; // How many Arrows in the problem are needed
//NSString *arrowStack = (NSString *) [problemView getArrowStackCount]; // How many arrows where used
//NSString *arrowIsHitBox = (NSString *) CGPointEqualToPoint(hitbox, CGPointMake(-1.0f, -1.0f)); // Is arrow on hitbox
//NSLog(@"StartE");
//NSLog(@"Before test: %d",arrowStack);
>>>>>>> Cleaned arrow code
if ([problemView isArrowInProgress]) {
CGPoint hitbox = [problemView isHitbox:touchPoint];
if (!CGPointEqualToPoint(hitbox, CGPointMake(-1.0f, -1.0f)))
{
[problemView endArrow:hitbox];
if ([problemView getArrowStackCount] == 1)
{
<<<<<<< HEAD
[problemView showElectrophileMarker:hitbox];
=======
//Checks to see if the current arrow drawn is on the correct hitbox and direction
if([problemView doesLastArrowMatchProblem]) {
NSLog(@"Arrow Match");
Expand All @@ -83,17 +72,10 @@ -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[problemView removeLastArrow];
[problemView clearNucleophileMarker];
}
>>>>>>> Cleaned arrow code
}

if ([problemView getArrowStackCount] > 1)
{
<<<<<<< HEAD
[problemView clearElectrophileMarker];
}
[problemView removeLastArrow];
}
=======
//NSLog(@"%d",!CGPointEqualToPoint(hitbox, CGPointMake(-1.0f, -1.0f)));
if([problemView doesLastArrowMatchProblem]) {
NSLog(@"Arrow Match past first");
Expand All @@ -114,7 +96,6 @@ -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
//NSLog(@"After test: %d",arrowStack);
}

>>>>>>> Cleaned arrow code
}
}

Expand Down
3 changes: 0 additions & 3 deletions Classes/ProblemView.m
Expand Up @@ -453,19 +453,16 @@ -(BOOL) doesArrowMatchProblem:(Arrow*)arrow
Element *elementB = [moleculeB.elements valueForKey:[NSString stringWithFormat:@"%i,%i", (int)locationB.x, (int)locationB.y]];
if ((elementA != nil) && (elementB != nil))
{
<<<<<<< HEAD
if ((elementA.type == ELEMENT_NUCLEOPHILE) && (elementB.type == ELEMENT_ELECTROPHILE))
{
return TRUE;
}
=======
//NSLog(@"elementA type = %d",elementA.type);
//NSLog(@"elementB type = %d",elementB.type);
if ((elementA.type == ELEMENT_NUCLEOPHILE) && (elementB.type == ELEMENT_ELECTROPHILE))
{
return TRUE;
}
>>>>>>> Cleaned arrow code
}
}

Expand Down

0 comments on commit db157ce

Please sign in to comment.