// This may look like C code, but it is really -*- C++ -*-

//
//  monopoly-template  --  Copyright (c) University of Aizu 1994
//
// [# Edit, Date, User, Module #]

#include <stream.h>
#include <Game.h>
#include <Deed.h>

void checkDeed()
{
  cerr << "Checking class Deed\n";
  Game game;
  DeedPtrList deedpl;

  game.read();
  game.write();

  deedpl.read();
  DeedPtr* d;
  int i = 0;

  for (d = *deedpl; d != 0; d = d->next()) {
    write((*d)->monopoly());
    (*d)->owner().write();
    (*d)->location().write();
  }

  for (d = *deedpl; d != 0; d = d->next()) {
    if (i++ % 2) (*d)->mortgage();
    else (*d)->payback();
    (*d)->owner() = Key("Sam");
    (*d)->location() = Key("Pacifica");
  }

  for (d = *deedpl; d != 0; d = d->next()) {
    write((*d)->monopoly());
    (*d)->owner().write();
    (*d)->location().write();
    write((*d)->mortgaged());
  }
}
