ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/util.pl
Revision: 1.1
Committed: Sat May 31 09:46:51 2003 UTC (21 years ago) by pcg
Content type: text/plain
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.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} = 1;#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