#include <cstdio>

#include "Board.h"
#include "AGE/Engine.h"

int main()
{
  AGE::Engine engine;

  printf("Initializing...\n");
  if (!engine.init())
  {
    printf("Advanced Game Engine failed to initialize. Exiting.\n");
    exit(1);
  }

  printf("Initialization complete.\nLoading the media...\n");
  if (!engine.loadMedia())
  {
    printf("Warning: some media files failed to load!\n");
  }
  printf("Media loded.\n");

  engine.startLoop();

  // Destroys the window and quits the SDL system:
  engine.close();
  return 0;
}

#include <iostream>

#include "Board.h"

int main()
{
  Board b(10, 10);
  b.fillRandomly(10);


  std::cout << "main executed" << std::endl;
  return 0;
}

--- 
+++ 
@@ -1,13 +1,29 @@
-#include <iostream>
+#include <cstdio>
 
 #include "Board.h"
+#include "AGE/Engine.h"
 
 int main()
 {
-  Board b(10, 10);
-  b.fillRandomly(10);
+  AGE::Engine engine;
 
+  printf("Initializing...\n");
+  if (!engine.init())
+  {
+    printf("Advanced Game Engine failed to initialize. Exiting.\n");
+    exit(1);
+  }
 
-  std::cout << "main executed" << std::endl;
+  printf("Initialization complete.\nLoading the media...\n");
+  if (!engine.loadMedia())
+  {
+    printf("Warning: some media files failed to load!\n");
+  }
+  printf("Media loded.\n");
+
+  engine.startLoop();
+
+  // Destroys the window and quits the SDL system:
+  engine.close();
   return 0;
 }
Use the engine to create a game window

Modifies the main unit, so that it will use the Advanced Graphics
Engine. The engine creates an 800x600 window and renders
the minesweeper tiles' texture in the top-left corner.
