Ejemplo n.º 1
0
void seed(world w){
    int i, j;
    /*  for(i=0; i<50; i++){
        world[rand()%w.size][rand()%w.size] = alive;
        }
        */

    create_glider(w, 2, 5);
    create_block(w, 1, 1);
//    create_pulsar(w, 2, 2);
}
Ejemplo n.º 2
0
figure_window::figure_window(QWidget* parent) : QDialog(parent)
{
    this->parent = parent;
    this->setFixedSize(WINDOW_SIZE);
    this->setWindowTitle("Выбор фигуры");
    QPalette pal;
    pal.setColor(QPalette::Background, QColor(0, 200, 100, 255));
    this->setPalette(pal);
    figure_label =  new QLabel(this);
    figure_label->move(WINDOW_SIZE.width() - 283, WINDOW_SIZE.height()  - 380);
    figure_label->setText("Выберете фигуру");
    figure_label->show();
    glider_button = new QPushButton("Глайдер", this);
    glider_button->resize(BUTTON_SIZE);
    glider_button->move(WINDOW_SIZE.width() - 300, WINDOW_SIZE.height() - 350);
    connect(glider_button, SIGNAL(clicked()), SLOT(create_glider()));
    spaceship_button = new QPushButton("Космический корабль", this);
    spaceship_button->resize(BUTTON_SIZE);
    spaceship_button->move(WINDOW_SIZE.width() - 300, WINDOW_SIZE.height() - 300);
    connect(spaceship_button, SIGNAL(clicked()), SLOT(create_spaceship()));
}