public void render(Graphics g)
    {
        for(int i = -1; i < Game.fieldHeight + 1; i++)//needs to be -1 and 1 to prevent ghosting
            {
            for(int j = -1; j < Game.fieldWidth + 1; j++)
            {
                //int n = getTile(j + x, i + y);
                Tile t = getTile(j + Game.xOff, i + Game.yOff);
                if (t != null && t.getType() > 0 && t.getType() < 10) {
                    //System.out.println("x:" + j + " y:" + i + " n:" + t.getType());
                    g.drawImage(sprite.tile[3][t.getType()], Game.MAPOFFX + j * Game.TILESIZE + xShift, Game.MAPOFFY + i * Game.TILESIZE + yShift, Game.TILESIZE, Game.TILESIZE, null);
                }
                else {
                    g.drawImage(sprite.tile[2][4], Game.MAPOFFX + j * Game.TILESIZE + xShift, Game.MAPOFFY + i * Game.TILESIZE + yShift, Game.TILESIZE, Game.TILESIZE, null);
                }
            }
        }
    }