Fonction de test
This commit is contained in:
parent
6c7443185e
commit
0b39b49109
22
main.cpp
22
main.cpp
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue