Changed my email in the copyright statements.
[tagua/yd.git] / src / usermove.h
blob2ce93aebc26dfb540fc10a7dfcca016a8e913140
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 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 USERMOVE_H
12 #define USERMOVE_H
14 #include <boost/shared_ptr.hpp>
15 #include "fwd.h"
16 #include "point.h"
18 struct NormalUserMove {
19 Point from;
20 Point to;
21 int promotionType;
23 NormalUserMove(const Point& from, const Point& to)
24 : from(from)
25 , to(to)
26 , promotionType(-1) { }
28 bool valid() const {
29 return from != Point::invalid() && to != Point::invalid();
33 struct DropUserMove {
34 int pool;
35 int piece_index;
36 Point to;
38 DropUserMove(int pool, int piece_index, const Point& to)
39 : pool(pool)
40 , piece_index(piece_index)
41 , to(to) { }
44 #endif //USERMOVE_H