// DeckInspector.m
// Part of Risk by Mike Ferris

#import "DeckInspector.h"
#import "DeckView.h"
#import "LanguageApp.h"
#import <appkit/Panel.h>

@implementation DeckInspector

+ initialize
{
	if (self == [DeckInspector class])  {
		[self setVersion:1];
	}
	return self;
}

- init
{
	[super init];
	[NXApp loadNibSection:"DeckInspector.nib" owner:self withNames:NO];
	[deckPanel setBecomeKeyOnlyIfNeeded:YES];
	[deckPanel orderFront:self];
	return self;
}

- free
{
	return [super free];
}

- showPanel
{
	[deckPanel orderFront:self];
	return self;
}

- (BOOL)panelOnScreen
{
	return [deckPanel isVisible];
}

- displayAllDecks
{
	[cardList display];
	[deck display];
	[discards display];
	[player1 display];
	[player2 display];
	[player3 display];
	[player4 display];
	[player5 display];
	[player6 display];
	[cardsPlayed display];
	return self;
}

- setCardList:cl deck:de discards:di player1:p1 player2:p2 player3:p3
				player4:p4 player5:p5 player6:p6 cardsPlayed:cp
{
	[cardList setDeck:cl];
	[deck setDeck:de];
	[discards setDeck:di];
	[player1 setDeck:p1];
	[player2 setDeck:p2];
	[player3 setDeck:p3];
	[player4 setDeck:p4];
	[player5 setDeck:p5];
	[player6 setDeck:p6];
	[cardsPlayed setDeck:cp];
	return self;
}


@end
