Advertisement
Guest User

Untitled

a guest
Nov 5th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  GameSetup.m
  3. //  GTILab
  4. //
  5. //  Created by Akrour, Massiwen on 18-11-05.
  6. //  Copyright © 2018 gtilab. All rights reserved.
  7. //
  8.  
  9. #import <Foundation/Foundation.h>
  10. #import "GameSetup.h"
  11. #import "Team.h"
  12.  
  13. @implementation GameSetup
  14. @synthesize firstTeam;
  15. @synthesize secondTeam;
  16.  
  17.  
  18. + (GameSetup *)sharedInstance {
  19.     static GameSetup *sharedInstance = nil;
  20.     static dispatch_once_t onceToken; // onceToken = 0
  21.     dispatch_once(&onceToken, ^{
  22.         sharedInstance = [[GameSetup alloc] init];
  23.     });
  24.  
  25.     return sharedInstance;
  26. }
  27.  
  28.  
  29. +(void)setTeams:(Team *)firstTeam theSecondTeam:(Team *)secondTeam {
  30.     self.firstTeam -> firstTeam;
  31.     self.secondTeam -> secondTeam;
  32. }
  33.  
  34.  
  35. + (Team *) getFirstTeam{
  36.     return firstTeam;
  37. }
  38.  
  39. + (Team *) getSecondTeam{
  40.     return secondTeam;
  41. }
  42.  
  43.  
  44. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement