head	1.9;
access;
symbols
	tonic_4:1.9
	tonic_3:1.9
	tonic_2:1.9
	demo:1.9.0.2
	design_report:1.9
	oral_presentation_freeze:1.7.0.4
	DAVEG_CDP:1.7.0.2
	template_integ:1.6.0.2;
locks; strict;
comment	@ * @;


1.9
date	95.12.02.05.58.53;	author hartmans;	state Exp;
branches;
next	1.8;

1.8
date	95.12.01.03.39.08;	author hartmans;	state Exp;
branches;
next	1.7;

1.7
date	95.11.24.17.07.07;	author hartmans;	state Exp;
branches
	1.7.4.1;
next	1.6;

1.6
date	95.11.21.07.30.13;	author jered;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	95.11.21.06.09.35;	author jered;	state Exp;
branches;
next	1.4;

1.4
date	95.11.21.05.22.51;	author hartmans;	state Exp;
branches;
next	1.3;

1.3
date	95.11.21.04.02.06;	author hartmans;	state Exp;
branches;
next	1.2;

1.2
date	95.11.20.00.52.45;	author hartmans;	state Exp;
branches;
next	1.1;

1.1
date	95.11.19.21.56.25;	author hartmans;	state Exp;
branches;
next	;

1.6.2.1
date	95.11.24.05.54.00;	author hartmans;	state Exp;
branches;
next	;

1.7.4.1
date	95.11.30.08.34.41;	author hartmans;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Fix errors bringing in David's changes.
@
text
@// This is -*- c++ -*- code

// $Id: move.h,v 1.8 1995/12/01 03:39:08 hartmans Exp $

#ifndef __MOVE_H__
#define __MOVE_H__

#include <6170.h>
#include <typeinfo.h>
#include <ps5/web_node.h>
class move {
public:
  // Overview: an abstract move passed between  board and player and game.
  // A move is an immutable stack/heap abstraction.
    
  // Destructors:
  virtual ~move();
  // Frees any state associated with move.
  
  // Methods:
  virtual void display(extensions *ext, ostream &body) = 0;
  // Effects: returns an html representation of this move for inclusion
  // in a move list.  The headers in extensions (if extensions is non-null)
  // can be used to determine the capabilities of the web client.
  // Effects:  Return a textual representation of the move for inclusion
  // in a move list.
  
  virtual bool operator == (move &m) = 0;
  // Effects: returns true if two moves are equal, else returns
  // false.  Move equality means that the effect of applying one
  // move to any board will be indistinguishable from the effect of
  // applying the other move to the same board.

  virtual move * copy() = 0;
  //Effects: returns a copy of this such that
  // this->copy() == this.
  
  virtual void * force ( typeinfo_t &type) = 0;

protected:
  // Constructors:
  move ();
  // Effects: creates an empty move.
  
  move (const move &m);
  // Effects: copies an empty move.
  
  move & operator = (const move & m );
  // Modifies: this
  // Effects: this becomes m
};

inline move::move () {}

inline move::move(const move &) {/*argsused*/}

inline move &move::operator = (const  move &) {return *this;}


#endif

@


1.8
log
@Integrate oral presentation changes into main line.
@
text
@d3 1
a3 1
// $Id: move.h,v 1.7.4.1 1995/11/30 08:34:41 hartmans Exp $
a58 1
inline move::~move() {}
@


1.7
log
@Add prototype for const force method to board,
fix bug in move.h.

(These are the changes I accidentally checked on on template_inetg)
@
text
@d3 1
a3 1
// $Id: move.h,v 1.6.2.1 1995/11/24 05:54:00 hartmans Exp $
d55 1
a55 1
inline move::move(const move &m) {/*argsused*/}
d57 1
a57 1
inline move &move::operator = (const  move &m) {return *this;}
@


1.7.4.1
log
@Remove unused named arguments
@
text
@d3 1
a3 1
// $Id: move.h,v 1.7 1995/11/24 17:07:07 hartmans Exp $
d55 1
a55 1
inline move::move(const move &) {/*argsused*/}
d57 1
a57 1
inline move &move::operator = (const  move &) {return *this;}
@


1.6
log
@test_board stuff now builds. (Deconst'ed move.)
@
text
@d3 1
a3 1
// $Id: move.h,v 1.5 1995/11/21 06:09:35 jered Exp $
d10 1
a10 1

@


1.6.2.1
log
@Add support for no-implicit-templates
and build ../lib/libbase.a
@
text
@d3 1
a3 1
// $Id: move.h,v 1.6 1995/11/21 07:30:13 jered Exp $
d10 1
a10 1
#include <ps5/web_node.h>
@


1.5
log
@Added test_board.C, and Changelog, Updated TODO.
Modified game.C.
@
text
@d3 1
a3 1
// $Id: move.h,v 1.4 1995/11/21 05:22:51 hartmans Exp $
a11 2


d13 2
a14 3
    // Overview: an abstract move passed between  board and player and game.
// A move is an immutable stack/heap abstraction.

d16 23
a38 23
    // Destructors:
    virtual ~move();
    // Frees any state associated with move.
    
    // Methods:
    virtual void display(extensions *ext, ostream &body) const = 0;
    // Effects: returns an html representation of this move for inclusion
    // in a move list.  The headers in extensions (if extensions is non-null)
    // can be used to determine the capabilities of the web client.
    // Effects:  Return a textual representation of the move for inclusion
    // in a move list.

    virtual bool operator == (const move &m) const = 0;
    // Effects: returns true if two moves are equal, else returns
    // false.  Move equality means that the effect of applying one
    // move to any board will be indistinguishable from the effect of
    // applying the other move to the same board.

    virtual move * copy() const = 0;
    //Effects: returns a copy of this such that
    // this->copy() == this.
    
    virtual void * force ( typeinfo_t &type) = 0;
d41 10
a50 11

    // Constructors:
    move ();
    // Effects: creates an empty move.

    move (const move &m);
    // Effects: copies an empty move.

    move & operator = (const move & m );
    // Modifies: this
// Effects: this becomes m
a51 1

@


1.4
log
@Lots of fixes to make stuff compile
@
text
@d3 1
a3 1
// $Id: move.h,v 1.2 1995/11/20 00:52:45 hartmans Exp $
d24 6
a29 2
    virtual string display () const = 0;
    // Effects:  Return a textual representation of the move for inclusion in a move list.
@


1.3
log
@fix operator ==
@
text
@@


1.2
log
@Support and changes for game
@
text
@d3 1
a3 1
// $Id: move.h,v 1.1 1995/11/19 21:56:25 hartmans Exp $
d27 1
a27 1
    virtual bool operator == () const = 0;
d35 1
a35 1
    this->copy() == this.
@


1.1
log
@Add move.h and move board::associate as protected
@
text
@d3 1
a3 1
// $Id$
d16 3
d33 4
d53 1
@
