private static void setUpObjects() {
BodyDef boxDef = new BodyDef();
boxDef.position.set(320 / 30 / 2f, 240 / 30 / 2f);
boxDef.type = BodyType.DYNAMIC;
PolygonShape boxShape = new PolygonShape();
boxShape.setAsBox(0.75f, 0.75f);
Body box = world.createBody(boxDef);
FixtureDef boxFixture = new FixtureDef();
boxFixture.density = 0.1f;
boxFixture.shape = boxShape;
box.createFixture(boxFixture);
bodies.add(box);
BodyDef groundDef = new BodyDef();
groundDef.position.set(0, 0);
groundDef.type = BodyType.STATIC;
PolygonShape groundShape = new PolygonShape();
groundShape.setAsBox(1000, 0);
Body ground = world.createBody(groundDef);
FixtureDef groundFixture = new FixtureDef();
groundFixture.density = 1;
groundFixture.restitution = 0.3f;
groundFixture.shape = groundShape;
ground.createFixture(groundFixture);
BodyDef leftWallDef = new BodyDef();
leftWallDef.position.set(0, 0);
leftWallDef.type = BodyType.STATIC;
PolygonShape leftWallShape = new PolygonShape();
leftWallShape.setAsBox(0, 1000);
Body leftWall = world.createBody(leftWallDef);
FixtureDef leftWallFixture = new FixtureDef();
leftWallFixture.density = 1;
leftWallFixture.restitution = 0.3f;
leftWallFixture.shape = leftWallShape;
leftWall.createFixture(leftWallFixture);
BodyDef rightWallDef = new BodyDef();
rightWallDef.position.set(320f / 30, 0);
rightWallDef.type = BodyType.STATIC;
PolygonShape rightWallShape = new PolygonShape();
rightWallShape.setAsBox(0, 1000);
Body rightWall = world.createBody(rightWallDef);
FixtureDef rightWallFixture = new FixtureDef();
rightWallFixture.density = 1;
rightWallFixture.restitution = 0.3f;
rightWallFixture.shape = rightWallShape;
rightWall.createFixture(rightWallFixture);
BodyDef topWallDef = new BodyDef();
topWallDef.position.set(0, 240f / 30);
topWallDef.type = BodyType.STATIC;
PolygonShape topWallShape = new PolygonShape();
topWallShape.setAsBox(1000, 0);
Body topWall = world.createBody(topWallDef);
FixtureDef topWallFixture = new FixtureDef();
topWallFixture.density = 1;
topWallFixture.restitution = 0.3f;
topWallFixture.shape = topWallShape;