text: #include "game.h"
  
  Game::Game(){}
  
  void Game::init(const char* title, int xpos, int ypos, int width, int height,
          					bool fullscreen){
  
  	int flags = (fullscreen ? SDL_WINDOW_FULLSCREEN : 0);
  
  	if(SDL_Init(SDL_INIT_EVERYTHING) == 0){
  		std::cout << "Subsystems initialized!" << std::endl;
  
  		window = SDL_CreateWindow(title, xpos, ypos, width, height,
  									flags);
  		if(window)
  			std::cout << "Window created!" << std::endl;
  
  		renderer = SDL_CreateRenderer(window, -1, 0);
  		if(renderer){
  			SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
  			std::cout << "Renderer created!" << std::endl;
  		}
  
  		isRunning = true;
  	}else{
  		isRunning = false;
  	}
  }
  
  void Game::handleEvents(){
  	SDL_Event event;
  	SDL_PollEvent(&event);
  	switch(event.type){
  	case SDL_QUIT:
  		isRunning = false;
  		break;
  	default:
  		break;
  	}
  
  }
  
  void Game::update(){
  	cnt++;
  	std::cout << cnt << std::endl;
  }
  
  void Game::render(){
  	SDL_RenderClear(renderer);
  	SDL_RenderPresent(renderer);
  }
  
  void Game::clean(){
  	SDL_DestroyWindow(window);
  	SDL_DestroyRenderer(renderer);
  	SDL_Quit();
  	std::cout << "Game cleaned" << std::endl;
  }
  