public void draw(Game game, Graphics2D g2d) {
    // Gets Actual screen dimensions.
    Dimension res = game.getSize();
    // Fill it black.
    g2d.setBackground(COLORS[0]);
    g2d.setColor(COLORS[0]);
    g2d.fillRect(0,0,res.width,res.height); 
    
    // Virtual Screen dimensions. (This will always be 16:9 ratio)
    int screen[] = new int[2];
    screen[0] = res.width; screen[1] = (screen[0]/16)*9;
    if(screen[1] > res.height) { screen[1] = res.height; screen[0] = (screen[1]/9)*16; }
    
    // Get the size of the padding on the edge of the screen after 16:9 ratio has been achieved.
    // Used for letterboxing.
    int margin[] = new int[2];
    margin[0] = (res.width-screen[0])/2;
    margin[1] = (res.height-screen[1])/2;
    
    // Draw screen.
    // g2d.setColor(COLORS[2]);
    // g2d.fillRect(margin[0],margin[1],screen[0],screen[1]);
    
    // Translate to the screen's position
    g2d.translate(margin[0],margin[1]);
    
    if(game.state == 0) { 
      g2d.translate(screen[0]/8,0);
      drawGrid(game,g2d,screen); 
      g2d.translate(-(screen[0]/8),0);
    }
    else if (game.state == 1) { 
      g2d.translate(screen[0]/8,0);
      drawBullets(g2d,game.level.bullets,screen);
      drawEnemies(g2d,game.level.enemies,screen);
      drawGrid(game,g2d,screen);
      g2d.translate(-(screen[0]/8),0);
      
      drawGrid(game,g2d,screen); 
    }
    else if(game.state == 2) { 
      g2d.translate(screen[0]/8,0);
      
      //g2d.setColor(COLORS[3]);
      //g2d.fillRect(0,0,screen[1],screen[1]);
      
      //g2d.setColor(COLORS[3]);
      //g2d.drawRect(0,0,screen[1],screen[1]);
      drawBullets(g2d,game.level.bullets,screen);
      drawEnemies(g2d,game.level.enemies,screen);
      drawPowerups(g2d,game.level.powerups,screen);
      game.player.draw(g2d,screen,this); 
      //gmae.level.draw(g2d,screen,game);
      
      drawGrid(game,g2d,screen);
      g2d.translate(-(screen[0]/8),0);
    
    }
    else if(game.state == 3) { 
      g2d.translate(screen[0]/8,0);
      
      g2d.setColor(COLORS[3]);
      g2d.fillRect(0,0,screen[1],screen[1]);
      
      drawCenteredString("Insert Credits here",screen[1],screen[1],g2d);
      
      
      g2d.translate(-(screen[0]/8),0);
    
    }
    // Draw letterbox
    g2d.translate(-margin[0],-margin[1]);
    g2d.setColor(COLORS[0]);
    g2d.fillRect(0,0,margin[0],screen[1]);
    g2d.fillRect(0,0,screen[0],margin[1]);
    g2d.translate(res.width,res.height);
    g2d.fillRect(0,0,-margin[0],-screen[1]);
    g2d.fillRect(0,0,-screen[0],-margin[1]);
    // Draw Bullets
    // Draw Enemies
    // Draw Player
    // Draw Overlay
  }