+ return entity;
+ },
+
+ /**
+ * Creates a static arena entity
+ *
+ * @function createArena
+ * @memberof SumoFactory
+ * @param {external:Serpentity} [engine] the serpentity engine to attach
+ * to. If not sent, it will not be attached.
+ * @param {object} [config] the config to override the entity, accepts
+ * the key `position` as an object with an x and y property.
+ * @return {external:Serpentity.Entity} the created entity
+ */
+ createArena(engine, config = {}) {
+
+ const entity = new Entity();
+
+ // POSITION
+
+ entity.addComponent(new PositionComponent(config.position));
+ const position = entity.getComponent(PositionComponent);
+
+ // RENDERING
+
+ const radius = 300;
+
+ const container = config.container || {
+ container: PixiFactory.createArena({ radius })
+ };
+ container.container.position.x = position.x;
+ container.container.position.y = position.y;
+ entity.addComponent(new PixiContainerComponent(container));
+
+ if (engine) {
+ engine.addEntity(entity);
+ }
+
+ return entity;
+ },
+
+ /**
+ * Creates an invisible block
+ *
+ * @function createInvisibleBlock
+ * @memberof SumoFactory
+ * @param {external:Serpentity} [engine] the serpentity engine to attach
+ * to. If not sent, it will not be attached.
+ * @param {object} [config] the config to override the entity, accepts
+ * the key `position` as an object with an x and y property.
+ * @return {external:Serpentity.Entity} the created entity
+ */
+ createInvisibleBlock(engine, config = {}) {
+
+ const entity = new Entity();
+
+ // POSITION
+
+ entity.addComponent(new PositionComponent(config.position));
+ const position = entity.getComponent(PositionComponent);
+
+ // PHYSICS
+
+ const friction = 0;
+ const frictionStatic = 0;
+ const restitution = 1;
+ const label = config.label || 'Invisible Block';
+ const isSensor = !!(config.isSensor);
+
+ const body = Bodies.rectangle(position.x / Config.meterSize,
+ position.y / Config.meterSize,
+ config.width / Config.meterSize,
+ config.height / Config.meterSize,
+ {
+ isSensor,
+ isStatic: true,
+ label,
+ friction,
+ restitution,
+ frictionStatic
+ });
+ entity.addComponent(new BodyComponent({ body }));
+
+ if (engine) {
+ engine.addEntity(entity);
+ }
+
+ return entity;
+ },
+
+ /**
+ * Creates an invisible block that accumulates points if certain
+ * entity collids with it
+ *
+ * @function createPointsCollider
+ * @memberof SumoFactory
+ * @param {external:Serpentity} [engine] the serpentity engine to attach
+ * to. If not sent, it will not be attached.
+ * @param {object} [config] the config to override the entity, accepts
+ * the key `position` as an object with an x and y property.
+ * @return {external:Serpentity.Entity} the created entity
+ */
+ createPointsCollider(engine, config = {}) {
+
+ const entity = this.createInvisibleBlock(null, Object.assign({
+ isSensor: true,
+ label: 'Points Detector'
+ }, config));
+
+ // Points Collider
+
+ entity.addComponent(new PointsColliderComponent(config));
+
+ if (engine) {
+ engine.addEntity(entity);
+ }
+
+ return entity;
+ },
+
+ /**
+ * Creates an entity representing the game state
+ *
+ * @function createGameState
+ * @memberof SumoFactory
+ * @param {external:Serpentity} [engine] the serpentity engine to attach
+ * to. If not sent, it will not be attached.
+ * @param {object} [config] the config to override the entity, accepts
+ * the key `position` as an object with an x and y property.
+ * @return {external:Serpentity.Entity} the created entity
+ */
+ createGameState(engine, config = {}) {
+
+ const entity = new Entity();
+
+ entity.addComponent(new PointsComponent(config));
+ entity.addComponent(new WinnerComponent(config));
+
+ if (engine) {
+ engine.addEntity(entity);
+ }
+