Ejemplo n.º 1
0
Archivo: INIFile.C Proyecto: HeyJJ/ball
	Size INIFile::getNumberOfLines() const
	{
		Size number_of_lines(0);
	
		list<Section>::const_iterator it = sections_.begin();
		for (; it != sections_.end(); ++it)
		{
			number_of_lines += it->lines_.size();
		}
		
		return number_of_lines;
	}	
Ejemplo n.º 2
0
void	replay(t_all *a)
{
  char	c;

  c = 0;
  my_printf("Voulez vous rejouer ? [O : N] : ");
  a->res = scanf("%c", &c);
  purge();
  if ((c == 'O' || c == 'o') && a->res != -1)
    {
      number_of_lines(a);
      init_i(a, 0);
      allum1(a);
    }
  else if ((c == 'N' || c == 'n') && a->res != -1)
    my_exit("Merci d'avoir joué");
  else
    {
      my_putstr("\033[H\033[2J");
      replay(a);
      return ;
    }
}