Back to project page yahtzee4android.
The source code is released under:
GNU General Public License
If you think the Android project yahtzee4android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.tum.yahtzee.listeners; //from w ww.j a v a 2 s. c om import com.tum.yahtzee.GameController; import com.tum.yahtzee.units.Cube; import android.view.View; import android.view.View.OnClickListener; public class OnCubeClickListener implements OnClickListener { public OnCubeClickListener(int cubeId) { this.cubeId = cubeId; } private int cubeId; public int getCubeId() { return cubeId; } public void onClick(View v) { Cube cube = GameController.get().getCurrentPlayer().getCubes().get(cubeId); cube.setUsed(!cube.getUsed()); } }