Example #1
0
  public static Algorithme easy(String stringalgo) throws Throwable {
    FausseDetection fake;
    Algorithme algo = new Algorithme(stringalgo);
    fake = new FausseDetection(algo);

    Cube leCube = fake.detecter(null, null, null, null, null, null);
    Cube test = Cube.creerCube(leCube.toFace());

    /* RĂ©solution */
    ResolutionDuCube er2 = new EasyResolution(test);
    Algorithme Soluce2 = new Algorithme();
    Soluce2 = er2.trouverSolution();

    return Soluce2;
  }
Example #2
0
  public static Algorithme medium(String stringalgo) throws Throwable {
    FausseDetection fake;
    Algorithme algo = new Algorithme(stringalgo);
    fake = new FausseDetection(algo);

    Cube leCube = fake.detecter(null, null, null, null, null, null);
    Cube test = Cube.creerCube(leCube.toFace());

    /* RĂ©solution */
    Algorithme Soluce = new Algorithme();
    // EasyResolution er = new EasyResolution(leCube);
    ResolutionDuCube er = new MediumResolution(leCube);
    Soluce = er.trouverSolution();

    return Soluce;
  }
Example #3
0
  public void draw() {

    // Center in display window
    translate(width / 2, height / 2, -1500);
    // if the user turned on the angled view
    if (a) {
      rotateX(radians(-30));
    }

    background(0);
    lights();
    noFill();
    smooth();
    // if the user turned on borders
    if (b) {
      stroke(255);
    }

    stage.create();
    ball.create();

    if (z) {
      fill(255, 255, 255, 100);
      instructions.loadInstructions();
    }

    if (keyPressed) {
      if (key == 'a' || key == 'A') {
        a = (a) ? false : true;
      }

      if (key == 'b' || key == 'B') {
        b = (b) ? false : true;
      }

      if (key == 'c' || key == 'C') {
        c = (c) ? false : true;
      }

      if (key == 'g' || key == 'G') {
        g = (g) ? false : true;
      }

      if (key == 'z') {
        z = (z) ? false : true;
      }
    }
  }