Changed my email in the copyright statements.
[tagua/yd.git] / src / hlvariant / crazyhouse / movefactory.h
blobca993b1613dfff5a26151cd5717ddc1f763bf694
1 /*
2 Copyright (c) 2006-2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006-2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef HLVARIANT__CRAZYHOUSE__MOVEFACTORY_H
12 #define HLVARIANT__CRAZYHOUSE__MOVEFACTORY_H
14 #include "../movefactory.h"
16 namespace HLVariant {
17 namespace Crazyhouse {
19 template <typename GameState>
20 class MoveFactory : public HLVariant::MoveFactory<GameState> {
21 public:
22 typedef typename HLVariant::MoveFactory<GameState> Base;
23 typedef typename Base::Move Move;
24 typedef typename Base::Piece Piece;
26 virtual Move createDropMove(const DropUserMove& drop) {
27 return Move(static_cast<typename Piece::Color>(drop.pool),
28 drop.piece_index,
29 drop.to);
33 } // namespace Crazyhouse
34 } // namespace HLVariant
36 #endif // HLVARIANT__CRAZYHOUSE__MOVEFACTORY_H