Fonction de test

This commit is contained in:
Mattéo Delabre 2016-03-11 16:14:34 +01:00
parent 6c7443185e
commit 0b39b49109
1 changed files with 14 additions and 8 deletions

View File

@ -6,20 +6,26 @@
int main() { int main() {
Engine engine; Engine engine;
Ball ball(0, 0); Ball ball1(3 * Block::GRID, 1 * Block::GRID);
Block block1(0 * Block::GRID, 3 * Block::GRID); Ball ball2(5 * Block::GRID, 1 * Block::GRID);
Block block2(1 * Block::GRID, 3 * Block::GRID);
Block block3(2 * Block::GRID, 3 * Block::GRID);
Block block4(3 * Block::GRID, 3 * Block::GRID);
ball.setCharge(100); Block block1(2 * Block::GRID, 7 * Block::GRID);
block4.setCharge(-100); Block block2(3 * Block::GRID, 7 * Block::GRID);
Block block3(4 * Block::GRID, 7 * Block::GRID);
Block block4(5 * Block::GRID, 7 * Block::GRID);
Block block5(6 * Block::GRID, 7 * Block::GRID);
engine.addObject(&ball); ball1.setCharge(2);
ball2.setCharge(-2);
block3.setCharge(10);
engine.addObject(&ball1);
engine.addObject(&ball2);
engine.addObject(&block1); engine.addObject(&block1);
engine.addObject(&block2); engine.addObject(&block2);
engine.addObject(&block3); engine.addObject(&block3);
engine.addObject(&block4); engine.addObject(&block4);
engine.addObject(&block5);
engine.start(); engine.start();
return 0; return 0;