use of nars.op.java.Opjects in project narchy by automenta.
the class Tetris method actionsReflect.
private void actionsReflect() {
Opjects oo = new Opjects(nar);
oo.exeThresh.set(0.6f);
oo.methodExclusions.add("toVector");
// state = new TetrisState(tetris_width, tetris_height, 2);
state = // oo.the("tetris", this.state);
oo.a("tetris", TetrisState.class, tetris_width, tetris_height, 2);
}
use of nars.op.java.Opjects in project narchy by automenta.
the class ConnectFour method main.
public static void main(String[] args) {
NAR n = NARS.tmp();
n.log();
Opjects o = new Opjects(n);
ConnectFourState game = o.a("c", ConnectFourState.class);
JFrame frame = constructApplicationFrame(game);
frame.setSize(450, 450);
frame.setVisible(true);
while (true) {
switch(game.moving()) {
case 1:
game.drop(n.random().nextInt(game.cols));
break;
case 2:
game.drop(n.random().nextInt(game.cols));
break;
}
frame.repaint();
n.run(1);
Util.sleep(25);
if (game.isTerminal())
game.clear();
}
}
Aggregations