ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/util.pl
Revision: 1.2
Committed: Sat May 31 10:58:30 2003 UTC (21 years ago) by pcg
Content type: text/plain
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 package util;
2
3 use Storable ();
4 use Scalar::Util ();
5
6 my $staterc = "$ENV{HOME}/.kgsueme";
7
8 my $state = -r $staterc ? Storable::retrieve($staterc) : {};
9 my @widgets;
10
11 $::config = $state->{config} ||= {};
12
13 $::config->{speed} = 0;#d# optimize for speed or memory?
14 $::config->{conserve_memory} = 0; # try to conserve memory at the expense of speed
15 $::config->{randomize} = 0; # randomize placement of stones
16
17 sub save_config {
18 gtk::save_state;
19 Storable::nstore($state, $staterc);
20 }
21
22 1;
23