File indexing completed on 2024-05-05 04:02:56
0001 #!/usr/bin/perl -w 0002 0003 # SPDX-FileCopyrightText: 2010 Ni Hui <shuizhuyuanluo@126.com> 0004 # 0005 # SPDX-License-Identifier: GPL-2.0-or-later 0006 0007 use strict; 0008 # this script updates klickety ksame mode highscores according to the 0009 # original ksame game. 0010 0011 # read the whole config file 0012 while ( <> ) { 0013 chomp; # eat the trailing '\n' 0014 next if ( /^$/ ); # skip empty lines 0015 next if ( /^\#/ ); # skip comments 0016 next if ( /\d+_Board/ ); # skip board numbers 0017 print "[KHighscore_KSame]\n" if ( /^\[KHighscore\]$/ ); # [KHighscore] -> [KHighscore_KSame] 0018 print "$_\n" if ( /^\d+_(LastPlayer|Score|Name)=.*$/ ); # print the highscores 0019 }