Change Board::get() to return a pointer.
[tagua/yd.git] / src / variants / chess / namer.cpp
blob66a37e005131b25f4275e2f10a90514702e8b847
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
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.
8 */
10 #include "namer.h"
11 #include <core/color.h>
12 #include <core/piece.h>
13 #include <core/type.h>
15 namespace Chess {
17 QString Namer::name(const Piece& piece) const {
18 if (piece.color() && piece.type())
19 return piece.color()->name() + "_" + piece.type()->name();
20 else
21 return "";
24 } // namespace Chess