diff --git a/Tennis/objc/.idea/misc.xml b/Tennis/objc/.idea/misc.xml
index f48e1cf7..1162f438 100644
--- a/Tennis/objc/.idea/misc.xml
+++ b/Tennis/objc/.idea/misc.xml
@@ -1,23 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $USER_HOME$/.subversion
- false
-
diff --git a/Tennis/objc/.idea/vcs.xml b/Tennis/objc/.idea/vcs.xml
index def6a6a1..a5dd0864 100644
--- a/Tennis/objc/.idea/vcs.xml
+++ b/Tennis/objc/.idea/vcs.xml
@@ -2,6 +2,7 @@
+
diff --git a/Tennis/objc/.idea/workspace.xml b/Tennis/objc/.idea/workspace.xml
index 48fd3656..748a7d90 100644
--- a/Tennis/objc/.idea/workspace.xml
+++ b/Tennis/objc/.idea/workspace.xml
@@ -1,16 +1,26 @@
-
+
+
+
+
+
+
+
+
-
+
+
+
+
@@ -33,7 +43,7 @@
-
+
@@ -51,7 +61,7 @@
-
+
@@ -107,7 +117,7 @@
-
+
@@ -116,7 +126,7 @@
-
+
@@ -129,15 +139,25 @@
+
+
+
+
+
+
@@ -147,7 +167,7 @@
-
+
@@ -220,14 +240,14 @@
+
-
-
+
-
+
@@ -259,6 +279,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $USER_HOME$/.subversion
+ false
+
@@ -269,7 +307,7 @@
-
+
@@ -351,9 +389,9 @@
-
+
-
+
@@ -372,27 +410,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -400,6 +417,13 @@
+
+
+
+
+
+
+
@@ -407,16 +431,30 @@
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/Tennis/objc/Tennis/TennisGame.h b/Tennis/objc/Tennis/TennisGame.h
index 02b3c9c4..4634840d 100644
--- a/Tennis/objc/Tennis/TennisGame.h
+++ b/Tennis/objc/Tennis/TennisGame.h
@@ -10,6 +10,11 @@
@interface TennisGame : NSObject
+@property(nonatomic, copy) NSString *player1;
+@property(nonatomic, copy) NSString *player2;
+
+- (id)initWithPlayer1:(NSString *)player1 player2:(NSString *)player2;
+
- (void)wonPoint:(NSString *)player;
- (NSString *)score;
diff --git a/Tennis/objc/Tennis/TennisGame.m b/Tennis/objc/Tennis/TennisGame.m
index a3a6ccf6..e4fc9664 100644
--- a/Tennis/objc/Tennis/TennisGame.m
+++ b/Tennis/objc/Tennis/TennisGame.m
@@ -6,17 +6,23 @@
//
+#import "TennisGame3.h"
#import "TennisGame.h"
-@implementation TennisGame {
+@implementation TennisGame
-}
-- (void)wonPoint:(NSString *)player {
+- (id)initWithPlayer1:(NSString *)player1 player2:(NSString *)player2 {
+ self = [super init];
+ if (self) {
+ self.player1 = player1;
+ self.player2 = player2;
+ }
+
+ return self;
}
-- (NSString *)score {
- return nil;
-}
+- (void)wonPoint:(NSString *)player {}
+- (NSString *)score { return nil; }
@end
\ No newline at end of file
diff --git a/Tennis/objc/Tennis/TennisGame3.m b/Tennis/objc/Tennis/TennisGame3.m
index bc2d3456..b2a8a869 100644
--- a/Tennis/objc/Tennis/TennisGame3.m
+++ b/Tennis/objc/Tennis/TennisGame3.m
@@ -9,7 +9,6 @@
#import "TennisGame3.h"
-@implementation TennisGame3 {
+@implementation TennisGame3
-}
@end
\ No newline at end of file
diff --git a/Tennis/objc/TennisTests/TennisTests.m b/Tennis/objc/TennisTests/TennisTests.m
index a6e0a62a..8a21ca6e 100644
--- a/Tennis/objc/TennisTests/TennisTests.m
+++ b/Tennis/objc/TennisTests/TennisTests.m
@@ -98,17 +98,17 @@
}
- (void)testAllScoresTennisGame1 {
- TennisGame1 * game = [[TennisGame1 alloc] init];
+ TennisGame1 * game = [[TennisGame1 alloc] initWithPlayer1:@"player1" player2:@"player2"];
[self checkAllScoresForGame:game];
}
- (void)testAllScoresTennisGame2 {
- TennisGame2 * game = [[TennisGame2 alloc] init];
+ TennisGame2 * game = [[TennisGame2 alloc] initWithPlayer1:@"player1" player2:@"player2"];
[self checkAllScoresForGame:game];
}
- (void)testAllScoresTennisGame3 {
- TennisGame3 * game = [[TennisGame3 alloc] init];
+ TennisGame3 * game = [[TennisGame3 alloc] initWithPlayer1:@"player1" player2:@"player2"];
[self checkAllScoresForGame:game];
}