Project

General

Profile

Download (2.37 KB) Statistics
| Branch: | Revision:

phasedsolver / src / main / java / org / distorted / phasedsolver / SolverObjectLibInterface.java @ a8032ae7

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2024 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.phasedsolver;
11

    
12
import org.distorted.objectlib.helpers.ObjectLibInterface;
13

    
14
import java.lang.ref.WeakReference;
15

    
16
///////////////////////////////////////////////////////////////////////////////////////////////////
17

    
18
public class SolverObjectLibInterface implements ObjectLibInterface
19
{
20
  private final WeakReference<SolverActivity> mAct;
21

    
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23

    
24
  SolverObjectLibInterface(SolverActivity act) { mAct = new WeakReference<>(act); }
25
  public void onWinEffectFinished(long startTime, long endTime, int scrambleNum) { }
26
  public void onScrambleEffectFinished() { }
27
  public void onBeginRotation() { }
28
  public void onSolved() { }
29
  public void onObjectCreated(long time) { }
30
  public void failedToDrag() { }
31
  public void reportBlockProblem(int type, int place, long pause, long resume, long time) { }
32
  public void reportProblem(String problem, boolean reportException) {}
33
  public void onStickerUntouched() { }
34
  public void reportJSONError(String error, int ordinal) { }
35

    
36
///////////////////////////////////////////////////////////////////////////////////////////////////
37

    
38
  public void onStickerTouched(int cubit, int face)
39
    {
40
    SolverActivity act = mAct.get();
41
    act.addSticker(cubit,face);
42
    }
43

    
44
///////////////////////////////////////////////////////////////////////////////////////////////////
45

    
46
  public void onRemoveRotation(int axis, int rowBitmap, int angle)
47
    {
48
    SolverActivity act = mAct.get();
49
    act.addMove(axis,rowBitmap,angle);
50
    }
51
}
(3-3/5)