public Game()
    {        
        int i = 0;
        int j = 0;
        int k = 0;
        int l = 0;
        dots = new Dot[count('.')];
        enemy = new Enemy[count('e')];
        exit = new Exit[count('x')];
        wall = new Wall[count('#')];
        xLimit = Util.xLimit();
        yLimit = Util.yLimit();
        screen = new Screen(xLimit,yLimit);
        for (int row = 0; row < yLimit; row++)
        {            
            for (int col = 0; col < xLimit; col++)
            {                
                Vector pos = new Vector(col, row);
                char state = Util.at(pos);
                screen.setPixel(pos,state);
                switch (state)
                {
                    case 'x': exit[i] = new Exit(pos);
                        i++;
                        break;
                    case '.': dots[j] = new Dot(pos);
                        j++;
                        break;
                    case 'e': enemy[k] = new Enemy(pos);
                        k++;
                        break;
                    case 'p': player = new Player(pos);
                        break;
                    case '#': screen.setPixel(pos,'\u25AF');
                        wall[l] = new Wall(pos);
                        l++;
                        break;
                    default: break;
                }
            }
        }
    }