File indexing completed on 2025-03-23 06:54:31
0001 /* 0002 SPDX-FileCopyrightText: 2008 Sascha Peilicke <sasch.pe@gmx.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #include "move.h" 0008 0009 #include "kigo_debug.h" 0010 0011 namespace Kigo { 0012 0013 Move::Move(const Player *player, const Stone &stone) 0014 : m_player(player), m_stone(stone) 0015 { 0016 } 0017 0018 Move::Move(const Move &other) 0019 : m_player(other.m_player), m_stone(other.m_stone) 0020 { 0021 } 0022 0023 Move &Move::operator=(const Move &other) 0024 { 0025 m_player = other.m_player; 0026 m_stone = other.m_stone; 0027 return *this; 0028 } 0029 0030 QDebug operator<<(QDebug debug, const Move &move) 0031 { 0032 debug.nospace() << "move of " << move.stone() << " by " << *move.player(); 0033 return debug; 0034 } 0035 0036 } // End of namespace Kigo