Source

tdd_ios_kiwi / code / HuntTheWumpus / HuntTheWumpus / models / Game.m

Full commit
//
//  Game.m
//  HuntTheWumpus
//
//  Created by Allan Davis on 9/24/12.
//  Copyright (c) 2012 Cajun Code. All rights reserved.
//

#import "Game.h"
#import "ADInput.h"
@implementation Game



+ (void) startLoop{
    Game * game = [[Game alloc]init];
    game.gameRunning = YES;
    //setup game
    while (game.gameRunning) {
        // update objects
        //draw the object
        //gather input
        [game exitGame];
    }
}

- (void) exitGame{
    printf("Type exit to quit. \n");
    NSString *input = [ADInput getString];
    puts(input.UTF8String);
    if ([input isEqualToString:@"exit"]) {
        self.gameRunning = NO;
    }

}

- (void) setup{
    NSString *story = @"";
}
@end