/usr/include/osl/sennichite.h is in libosl-dev 0.6.0-3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | /* sennichite.h
*/
#ifndef OSL_SENNICHITE_H
#define OSL_SENNICHITE_H
#include "osl/player.h"
#include <iosfwd>
namespace osl
{
class Sennichite
{
friend bool operator==(const Sennichite&, const Sennichite&);
struct Result
{
enum Values { NORMAL, DRAW, BLACK_LOSE, WHITE_LOSE };
};
Result::Values value;
Sennichite(Result::Values v) : value(v) {}
public:
static Sennichite NORMAL() { return Result::NORMAL; }
static Sennichite DRAW() { return Result::DRAW; }
static Sennichite BLACK_LOSE() { return Result::BLACK_LOSE; }
static Sennichite WHITE_LOSE() { return Result::WHITE_LOSE; }
bool isNormal() const { return value == Result::NORMAL; }
bool isDraw() const { return value == Result::DRAW; }
bool hasWinner() const
{
return (value == Result::BLACK_LOSE) || (value == Result::WHITE_LOSE);
}
Player winner() const;
};
inline bool operator==(const Sennichite& l, const Sennichite& r)
{
return l.value == r.value;
}
std::ostream& operator<<(std::ostream&, const Sennichite&);
} // namespace osl
#endif /* OSL_SENNICHITE_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|