#include <fstream>
using namespace std;

#include <cubepermanent.h>

cubepermanent::cubepermanent(cube & cb_)
  : cb(cb_)
{
  load();
}

void cubepermanent::load()
{
  ifstream file("cube.txt");

  if (!file)
    return;

  cb.read(file);
}

void cubepermanent::save() const 
{
  ofstream file("cube.txt");
   
  if (!file)
    return;

  file << cb;
}


