%eden
writeln("Loading...please wait");
## writeln("Generic version of loader");

/*

All files are taken from the local directory (localdirectory) or a secondary source (location)
Each file should end with the lines:

%eden
FileLoadedOkay = 1;

*/

## location = "http://www.dcs.warwick.ac.uk/~wmb/sudokuExperience/workshops/code/";
## localdirectory = "http://www.dcs.warwick.ac.uk/~wmb/sudokuExperience/workshops/workshop3A2/";

location = "http://www.dcs.warwick.ac.uk/~wmb/sudokuExperience/workshops/code/";
localdirectory = "http://www.dcs.warwick.ac.uk/~wmb/webeden/OpenDay/";

file1 = "1_basicsudoku.e";
file1a = "puzzles/puzzle_0.txt";
file2 = "2_possibilitiesnew.e";
file3 = "3_coloursudoku.e";
file4 = "4_restorestandardsudoku.e";
file5 = "buttonmenu.s";

## file5 = "buttoninclude.s";
file6 = "prototypehistory.e";
file7 = "draftsolversilent.e";
file8 = "interfacesolver.e";
file9 = "displaycounts.e";
file10 = "queryboxweb.s";

## writeln(location//file1);

installeddi();
proc garbage_collect {}; ## remove redundant (?) EDDI garbage collector

/*

FileLoadedOkay = 0;
onlineinclude(localdirectory // file5); ## button menu
%eden

if (FileLoadedOkay == 1) {
        writeln("File 1 Loaded OK");
} else {
        writeln("File 1 Failed to Load");
}
*/

FileLoadedOkay = 0;
onlineinclude(localdirectory//file1); ## basic sudoku
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 1 Loaded OK");
} else {
	writeln("File 1 Failed to Load");
}


FileLoadedOkay = 0;
onlineinclude(location//file1a);
%eden
if (FileLoadedOkay == 1) {
	## writeln("Puzzle Loaded OK");
} else {
	writeln("Puzzle Failed to Load");
}


FileLoadedOkay = 0;
onlineinclude(localdirectory//file2); ## possiblities
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 2 Loaded OK");
} else {
	writeln("File 2 Failed to Load");
}


FileLoadedOkay = 0;
## onlineinclude(location//file3); ## colour
onlineinclude(localdirectory//file3); ## colour with revised possdigitXY defn
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 3 Loaded OK");
} else {
	writeln("File 3 Failed to Load");
}

FileLoadedOkay = 0;
onlineinclude(location//file4); ## revert
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 4 Loaded OK");
} else {
	writeln("File 4 Failed to Load");
}

FileLoadedOkay = 0;
onlineinclude(localdirectory//file5); ## buttons
## writeln(localdirectory//file5);
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 5 Loaded OK");
} else {
	writeln("File 5 Failed to Load");
}

FileLoadedOkay = 0;
onlineinclude(location//file6); ## prototype history
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 6 Loaded OK");
} else {
	writeln("File 6 Failed to Load");
}


FileLoadedOkay = 0;
onlineinclude(location//file7); ## draft solver
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 7 Loaded OK");
} else {
	writeln("File 7 Failed to Load");
}



FileLoadedOkay = 0;
onlineinclude(location//file8); ## interface solver
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 8 Loaded OK");
} else {
	writeln("File 8 Failed to Load");
}


FileLoadedOkay = 0;
onlineinclude(localdirectory//file9); ## interface solver
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 9 Loaded OK");
} else {
	writeln("File 9 Failed to Load");
}


FileLoadedOkay = 0;
onlineinclude(localdirectory//file10); ## interface solver
%eden
if (FileLoadedOkay == 1) {
	## writeln("File 10 Loaded OK");
} else {
	writeln("File 10 Failed to Load");
}


FileLoadedOkay = 0;

writeln("Finished!");
