skizzle/src/main.cpp

33 lines
807 B
C++
Raw Normal View History

2016-03-04 15:29:31 +00:00
#include "ball.hpp"
2016-03-10 20:58:30 +00:00
#include "block.hpp"
2016-03-04 15:29:31 +00:00
#include "engine.hpp"
2016-03-10 20:58:30 +00:00
#include <iostream>
2016-03-04 15:29:31 +00:00
int main() {
Engine engine;
2016-03-10 20:58:30 +00:00
2016-03-11 15:14:34 +00:00
Ball ball1(3 * Block::GRID, 1 * Block::GRID);
Ball ball2(5 * Block::GRID, 1 * Block::GRID);
2016-03-11 14:17:08 +00:00
2016-03-11 15:14:34 +00:00
Block block1(2 * Block::GRID, 7 * Block::GRID);
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);
2016-03-04 15:29:31 +00:00
2016-03-11 15:14:34 +00:00
ball1.setCharge(2);
ball2.setCharge(-2);
block3.setCharge(10);
engine.addObject(&ball1);
engine.addObject(&ball2);
2016-03-10 21:15:56 +00:00
engine.addObject(&block1);
engine.addObject(&block2);
engine.addObject(&block3);
engine.addObject(&block4);
2016-03-11 15:14:34 +00:00
engine.addObject(&block5);
2016-03-10 20:58:30 +00:00
engine.start();
2016-03-04 15:29:31 +00:00
return 0;
}