Exemple #1
0
 void gameStarted(
     final String title,
     final boolean hasCustom,
     final boolean hasStatus,
     final boolean canSolve,
     float[] colours) {
   gameView.colours = new int[colours.length / 3];
   for (int i = 0; i < colours.length / 3; i++)
     gameView.colours[i] =
         Color.rgb(
             (int) (colours[i * 3] * 255),
             (int) (colours[i * 3 + 1] * 255),
             (int) (colours[i * 3 + 2] * 255));
   customVisible = hasCustom;
   solveEnabled = canSolve;
   runOnUiThread(
       new Runnable() {
         public void run() {
           if (gameView.colours.length > 0) gameView.setBackgroundColor(gameView.colours[0]);
           setTitle(title);
           setStatusBarVisibility(hasStatus);
         }
       });
 }