Added real animations to the Shogi animator.
[tagua.git] / src / pathinfo.h
blobe31512dad2cb9b043b379be7c1dccd506a3a92f3
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
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 PATHINFO_H
12 #define PATHINFO_H
14 class PathInfo {
15 public:
16 enum Direction {
17 Undefined,
18 Horizontal,
19 Vertical,
20 Diagonal1,
21 Diagonal2
23 private:
24 Direction m_direction;
25 int m_num_obstacles;
26 public:
28 PathInfo(Direction direction, int num_obstacles);
30 bool parallel() const { return m_direction == Horizontal || m_direction == Vertical; }
31 bool diagonal() const { return m_direction == Diagonal1 || m_direction == Diagonal2; }
32 bool clear() const { return m_num_obstacles == 0; }
33 int numObstacles() const { return m_num_obstacles; }
34 bool valid() const { return m_direction != Undefined; }
37 #endif // PATHINFO_H