new 990aace9276b9b070a7fbae82fa73469c6d99ec2
[tagua/yd.git] / src / variants / chess5x5 / chess5x5.java
blob30fe202c08e5213682bfeea03559728239f38004
1 package org.tagua-project.variants.chess5x5;
3 import org.tagua-project.core.Component;
4 import org.tagua-project.core.Repository;
5 import org.tagua-project.core.Point;
6 import org.tagua-project.core.IVariantLoader;
8 public class Chess5x5 {
9 public static Repository initrepo(IVariantLoader loader) {
10 Repository repo = new Repository();
11 Repository chess = loader.getRepository("chess");
12 if (chess == null) return null;
14 repo.setProxy(chess);
16 Component chess_state_factory = chess.getComponent("state_factory");
17 Component state_factory = chess_state_factory.invoke(
18 "createFactory", new Point(5, 5));
20 repo.addComponent("state_factory", state_factory);
22 return repo;