/* This file is part of cardwords
   (c) 1998 1999 2000 Tobias Peters
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

// cardwords_move.hh

/*
  A move consists of 
  - a TableLocation where it is going to
  - a direction, horizontal or vertikal
  - a CardSelection that specifies which Cards in which order go
  . in the free Places

  A  move consists only of the cards that actually get moved.

  So if [A 1] is already on the table at (7,7), and we want to lay
  'gap' horizontally from (6,7) to (8,7), the move would look like
  (7,7)_2[G 2][P 4]
  L___J|L_________J
  . |  |  +-Selection
  . |  +----Direction
  . +-------TableLocation

*/
#ifndef CARDWORDS_MOVE_HH
#define CARDWORDS_MOVE_HH

#include "cardwords_cardselection.hh"
#include "cardwords_cardtablelocation.hh"
#include "cardwords_direction.hh"
namespace CardWords {

class Move : public CardSelection {
public:
  CardTableLocation location;
  Direction         direction;

  Move();

  Move & operator = (const CardDescription & desc);

  Move & operator = (const CardSelection & sel);

  Move & operator = (const Move & other);

  Move(const CardSelection & sel);
};
}
ostream & operator << (ostream & ostream, const CardWords::Move & move);

istream & operator >> (istream & istream, CardWords::Move & move);

#endif

