1
/* Groundhog -- a simple logic game
2
* Copyright (C) 1998-2001 Maurits Rijk
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31
Score(const std::string& name, int seconds) : _name(name),
33
int operator<(Score& score);
34
friend std::ostream& operator<<(std::ostream& s, const Score& score);
35
friend std::istream& operator>>(std::istream& s, Score& score);
36
const std::string& GetName() const {return _name;}
37
int GetSeconds() const {return _seconds;}
41
std::list<Score> _list;
45
bool IsNewHighScore(int seconds);
46
void AddHighScore(Score& score);
47
friend std::ostream& operator<<(std::ostream& s, const ScoreList& slist);
48
friend std::istream& operator>>(std::istream& s, ScoreList& slist);
49
std::list<Score>::const_iterator Begin() const {return _list.begin();}
50
std::list<Score>::const_iterator End() const {return _list.end();}