1
/* -*- Mode: vala; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3
* Copyright (C) 2013 Michael Catanzaro
5
* This file is part of Iagno.
7
* Iagno is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 2 of the License, or
10
* (at your option) any later version.
12
* Iagno is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with Iagno. If not, see <http://www.gnu.org/licenses/>.
27
public string to_string ()
36
warn_if_fail (this == NONE);
41
public static Player from_char (char c)
42
requires (c == 'L' || c == 'D' || c == ' ')
58
public static Player flip_color (Player p)
59
requires (p == Player.LIGHT || p == Player.DARK)
61
if (p == Player.LIGHT)