-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
44 lines (35 loc) · 1.11 KB
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Game.h
// liar
//
// Created by Scott Nielsen on 1/18/11.
// Copyright 2011 Scott Nielsen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <dispatch/dispatch.h>
#import "GCDAsyncSocket.h"
@class Player;
@interface Game : NSObject <GCDAsyncSocketDelegate> {
long nextTag;
BOOL started;
BOOL startMsgSent;
NSMutableArray *players;
NSMutableArray *waiters;
int totalDice;
int currentPlayer;
int lastPlayer;
int currentBidCount;
int currentBidValue;
dispatch_source_t timeout;
}
@property (readonly) BOOL started;
- (Player *)playerForConnection:(int)conn fromPlayer:(Player *)player;
- (int)connectionForPlayer:(Player *)player fromPlayer:(Player *)requestor;
- (NSArray *)allPlayersFromPlayer:(Player *)player;
- (NSArray *)currentTurnFromPlayer:(Player *)player;
- (void)playerDidDisconnect:(Player *)player;
- (void)sendChat:(NSString *)message fromPlayer:(Player *)player;
- (void)playerIsReady:(Player *)player;
- (BOOL)bidCount:(int)count value:(int)value fromPlayer:(Player *)player;
- (BOOL)challengeFromPlayer:(Player *)player;
@end