Back to project page dice-probabilities.
The source code is released under:
MIT License
If you think the Android project dice-probabilities 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 org.kleemann.diceprobabilities; /*from ww w . j a v a 2s . c o m*/ import android.view.View; import android.widget.Button; public class TargetPool implements View.OnClickListener { private int count; private Target target; public TargetPool(int count, Button button, Target target) { this.count = count; this.target = target; button.setText(render()); button.setOnClickListener(this); } private String render() { if (count < 0) { return Integer.toString(count); } else { return "+" + count; } } public void onClick(View v) { target.add(count); } }