Java J2ME game for guess number source code
源代码在线查看: guessnumber.java
package GuessNoMIDlet;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*; //Random
public class GuessNumber extends MIDlet implements CommandListener
{
private Display display;
private Form startForm, playForm, failForm, successForm;
private Command exitCmd, startCmd, okCmd;
private ChoiceGroup choice;
private TextField textField;
private String str = "";
private int round = 0;
private int ans[] = new int[4];
private int result[] = new int [2]; //0: 'A'; 1: 'B';
private int watch = 0;
public GuessNumber()
{
startForm = new Form("匡虫");
playForm = new Form("瞦计