ftp.nice.ch/Attic/openStep/games/Risk.0.98.m.NIS.bs.tar.gz#/Risk.0.98/src/Risk/RiskWorld.h

This is RiskWorld.h in view mode; [Download] [Up]

//
// $Id: RiskWorld.h,v 1.2 1997/12/13 19:37:10 nygard Exp $
// This file is a part of Risk by Mike Ferris.
//

#import <Foundation/Foundation.h>

#import "Risk.h"

@class Continent;

// This should own the background image for the map view if there will
// be more than one world.

@interface RiskWorld : NSObject
{
    NSMutableSet *allCountries;
    NSArray *countryNeighbors;
    NSDictionary *continents;
    NSArray *cards;
}

+ (void) initialize;

+ defaultRiskWorld;

+ riskWorldWithContinents:(NSDictionary *)theContinents countryNeighbors:(NSArray *)neighbors cards:(NSArray *)theCards;

- initWithContinents:(NSDictionary *)theContinents countryNeighbors:(NSArray *)neighbors cards:(NSArray *)theCards;
- (void) dealloc;

- (void) encodeWithCoder:(NSCoder *)aCoder;
- initWithCoder:(NSCoder *)aDecoder;

- (void) _buildAllCountries;
- (void) _connectCountries;
- (void) _disconnectCountries;

- (NSSet *) allCountries;
- (Continent *) continentNamed:(NSString *)continentName;
- (NSDictionary *) continents;
- (NSArray *) cards;

- (int) continentBonusArmiesForPlayer:(Player)number;
- (NSSet *) countriesForPlayer:(Player)number;

@end

//======================================================================
// Some utility functions.
//======================================================================

NSSet *RWcountriesForPlayerNumber (NSSet *source, Player number);
NSSet *RWcountriesInContinentNamed (NSSet *source, NSString *continentName);
NSSet *RWcountriesWithArmies (NSSet *source);
NSSet *RWneighborsOfCountries (NSSet *source);

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.