#
# $Id: SimpleCard.pm,v 4.7 2002/07/21 06:49:52 kono Exp $
#

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