# $Id: Move.pm,v 1.1.1.1 2008/10/12 04:05:34 alamos Exp $ # The state is in an array package TicTacToe::Move; use strict; use TicTacToe::Position; use base qw(Exporter); use vars qw($VERSION); $VERSION='1.0'; sub new { my $self = shift; my $square = shift; return bless { square => $square, value => undef }; } sub square($) { my $self = shift; return $self->{square}; } sub value { my $self = shift; if(@_) {$self->{value} = shift} return $self->{value}; } 1;