#
# $Id: SimpleCard.pm,v 4.5 1999/02/07 08:00:38 kono Exp kono $
#

package CardPlay::SimpleCard;

use strict;

use vars qw($VERSION @ISA @EXPORT @EXPORT_OK
);

require Exporter;
require AutoLoader;

@ISA = qw(Exporter AutoLoader);

@EXPORT = qw( );

$VERSION = "0.2";

use Carp;
# use CardPlay::CardUndo;

# class method

sub new {
    my $type = shift;
    my ($suit,$number);
    my $self;
    
    %$self = @_;
    if (! defined($self->{'-suit'}) || 
        ! defined($self->{'-number'})) {
	carp "CardPlay::Card needs -suit,-number\n";
    }
    defined($self->{'-state'}) or $self->{'-state'} = 'removed';
    $suit = $self->{'-suit'};
    $number = $self->{'-number'};
    bless $self;
}

sub hide {
    my ($self) = shift;
    $self->{'-state'} = 'hide';
}

sub open {
    my ($self) = shift;
    $self->{'-state'} = 'open';
}
 
sub print {
    my ($self) = shift;
    print STDERR $self->{'-suit'},$self->{'-number'};
}

1;

# end
