 }
 
 
+class TextGridImpl {
+
+  var x = 0
+  var y = 0
+  var fontColor = SDL_Color(r: 0, g: 0, b: 0, a: 255)
+  var backgroundColor: SDL_Color?
+
+  func move(x: Int, y: Int) {
+    self.x = x
+    self.y = y
+  }
+
+  func add(string: String) {
+    var a = Array(string.characters)
+  }
+
+}
+
+
+let TextGrid = TextGridImpl()
+
+
 if SDL_Init(UInt32(SDL_INIT_VIDEO)) < 0 {
   throw SDLError.Init(message: "\(SDL_GetError())")
 }


defer { TTF_Quit() }

let fontPath = "/usr/share/fonts/truetype/freefont/FreeSans.ttf"
let freeSans = TTF_OpenFont(fontPath, 48)

if freeSans == nil {
  throw SDLError.FontLoad
}

let fontColor = SDL_Color(r: 0, g: 0, b: 255, a: 255)

// Blended version does anti-aliasing, finally!
let surfaceMsg = TTF_RenderText_Blended(freeSans, "Hello World!", fontColor)
//let surfaceMsg = TTF_RenderText_Solid(freeSans, "Hello World!", fontColor)

let msg = SDL_CreateTextureFromSurface(rend, surfaceMsg)


  SDL_SetRenderDrawColor(rend, 255, 255, 255, 255)
  SDL_RenderClear(rend)
  let msgResult = SDL_RenderCopy(rend, msg, nil, &msgRect)
  //msg.render(200, 200)
//  gTextTexture.render( ( SCREEN_WIDTH - gTextTexture.getWidth() ) / 2, ( SCREEN_HEIGHT - gTextTexture.getHeight() ) / 2 );
  SDL_RenderPresent(rend)
  SDL_Delay(100)
//   SDL_Delay(16)
}

// while true {
