Example #1
0
// Rollback changes
void UnLoadGEXT(Puzzle * puz)
{
    for (Square * square = puz->GetGrid().First();
         square != NULL;
         square = square->Next())
    {
        square->SetFlag(FLAG_CLEAR);
    }
}
Example #2
0
bool LoadGEXT(Puzzle * puz, const std::string & data)
{
    std::istringstream stream(data);
    istream_wrapper f(stream);

    std::string::const_iterator it = data.begin();
    for (Square * square = puz->GetGrid().First();
         square != NULL;
         square = square->Next())
    {
        square->SetFlag(f.ReadChar());
    }
    if (! f.CheckEof())
        return false;
    return true;
}