… | |
… | |
635 | } |
635 | } |
636 | } |
636 | } |
637 | } |
637 | } |
638 | |
638 | |
639 | $self->{board_shown} = Storable::dclone $self->{board}; |
639 | $self->{board_shown} = Storable::dclone $self->{board}; |
640 | #d# save |
|
|
641 | #Storable::nstore { board => $self->{board}, size => $self->{size}, path => $self->{path}}, "testboard.storable"; |
|
|
642 | } |
640 | } |
643 | |
641 | |
644 | sub redraw { |
642 | sub redraw { |
645 | my ($self, $x, $y, $w, $h) = @_; |
643 | my ($self, $x, $y, $w, $h) = @_; |
646 | |
644 | |
647 | if ($self->{pixbuf}) { |
645 | if ($self->{pixbuf}) { |
648 | $self->{canvas}->window->draw_pixbuf ($self->{canvas}->style->white_gc, $self->{pixbuf}, |
646 | $self->{canvas}->window->draw_pixbuf ($self->{canvas}->style->white_gc, $self->{pixbuf}, |
649 | $x, $y, $x, $y, $w, $h, |
647 | $x, $y, $x, $y, $w, $h, |
650 | "normal", 0, 0); |
648 | "normal", 0, 0); |
651 | $self->{canvas}->window->draw_rectangle ($self->{canvas}->style->black_gc, 0, |
649 | $self->{canvas}->window->draw_rectangle ($self->{canvas}->style->black_gc, 0, |
652 | $x - 1, $y - 1, $w + 2, $h + 2) if $::DEBUG_EXPOSE || 1;#d# |
650 | $x - 1, $y - 1, $w + 2, $h + 2) if $::DEBUG_EXPOSE; |
653 | } |
651 | } |
654 | } |
652 | } |
655 | |
653 | |
656 | sub update_board { |
654 | sub update_board { |
657 | my ($self) = @_; |
655 | my ($self) = @_; |