package chinesechecker;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class GameMap extends Canvas implements CommandListener ,Runnable{
public int intRunMode = 0; //0-等待初始态,1-下棋,2-等待用户响应
public boolean NowPlayer = true; //0-红棋(先下者),1-蓝棋(后下者)
private int rows = 0;
private int column = 0;
int canvash;
int canvasw;
int rows_distant;
int column_distant;
int radium;
int chessSelected;
boolean waitforPos = false;
int DesPos = -1;
//int keyNum0 = getKeyCode(Canvas.KEY_NUM0);
MoveStack temp = null;
boolean [] visited = new boolean[121];
boolean tryPlayer = false;
private static int [] chessPos = {0 , 12 ,
1 , 11 , 1 , 13 ,
2 , 10 , 2 , 12 , 2 , 14 ,
3 , 9 , 3 , 11 , 3 , 13 , 3 , 15 ,
4 , 0 , 4 , 2 , 4 , 4 , 4 , 6 , 4 , 8 , 4 , 10 , 4 , 12 , 4 , 14 , 4 , 16 , 4 , 18 , 4 , 20 , 4 , 22 , 4 , 24 ,
5 , 1 , 5 , 3 , 5 , 5 , 5 , 7 , 5 , 9 , 5 , 11 , 5 , 13 , 5 , 15 , 5 , 17 , 5 , 19 , 5 , 21 , 5 , 23 ,
6 , 2 , 6 , 4 , 6 , 6 , 6 , 8 , 6 , 10 , 6 , 12 , 6 , 14 , 6 , 16 , 6 , 18 , 6 , 20 , 6 , 22 ,
7 , 3 , 7 , 5 , 7 , 7 , 7 , 9 , 7 , 11 , 7 , 13 , 7 , 15 , 7 , 17 , 7 , 19 , 7 , 21 ,
8 , 4 , 8 , 6 , 8 , 8 , 8 , 10 , 8 , 12 , 8 , 14 , 8 , 16 , 8 , 18 , 8 , 20 ,
9 , 3 , 9 , 5 , 9 , 7 , 9 , 9 , 9 , 11 , 9 , 13 , 9 , 15 , 9 , 17 , 9 , 19 , 9 , 21 ,
10, 2 , 10, 4 , 10, 6 , 10, 8 , 10, 10 , 10, 12 , 10, 14 , 10, 16 , 10, 18 , 10, 20 , 10, 22 ,
11, 1 , 11, 3 , 11, 5 , 11, 7 , 11, 9 , 11, 11 , 11, 13 , 11, 15 , 11, 17 , 11, 19 , 11, 21 , 11, 23 ,
12, 0 , 12, 2 , 12, 4 , 12, 6 , 12, 8 , 12, 10 , 12, 12 , 12, 14 , 12, 16 , 12, 18 , 12, 20 , 12, 22 , 12, 24 ,
13, 9 , 13, 11 , 13, 13 , 13, 15 ,
14, 10 , 14, 12 , 14, 14 ,
15, 11 , 15, 13 ,
16, 12 };
private char [] chesslabel = {'0','1','2','3','4','5','6','7','8','9'};
private int [] chessOnBoard= {111,112,113,114,115,116,117,118,119,120};
private int [] chessOnBoardOpposit = {0,1,2,3,4,5,6,7,8,9};
private boolean [] boardStatus = {
true,true,true,true,true,true,true,true,true,true,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,
false,false,false,false,false,false,false,false,false,false,false,
true,true,true,true,true,true,true,true,true,true};
private int [] chessPosNow = {13, 9 , 13, 11 , 13, 13 , 13, 15 , 14, 10 , 14, 12 , 14, 14 , 15, 11 , 15, 13 , 16, 12 };
private int [] chessPosNowOpposit = {0 , 12 , 1 , 11 , 1 , 13 , 2 , 10 , 2 , 12 , 2 , 14 , 3 , 9 , 3 , 11 , 3 , 13 , 3 , 15 };
private static int [][] ChessNeighbor = {
{ 2, 1, -1, -1, -1, -1, 22 },
{ 4, 3, -1, 2, 0, -1, 21 },
{ 5, 4, 1, -1, -1, 0, 34 },
{ 7, 6, -1, 4, 1, -1, 20 },
{ 8, 7, 3, 5, 2, 1, 33 },
{ 9, 8, 4, -1, -1, 2, 45 },
{ 15, 14, -1, 7, 3, -1, 19 },
{ 16, 15, 6, 8, 4, 3, 32 },
{ 17, 16, 7, 9, 5, 4, 44 },
{ 18, 17, 8, -1, -1, 5, 55 },
{ 23, -1, -1, 11, -1, -1, 0 },
{ 24, 23, 10, 12, -1, -1, 2 },
{ 25, 24, 11, 13, -1, -1, 5 },
{ 26, 25, 12, 14, -1, -1, 9 },
{ 27, 26, 13, 15, 6, -1, 18 },
{ 28, 27, 14, 16, 7, 6, 31 },
{ 29, 28, 15, 17, 8, 7, 43 },
{ 30, 29, 16, 18, 9, 8, 54 },
{ 31, 30, 17, 19, -1, 9, 64 },
{ 32, 31, 18, 20, -1, -1, 74 },
{ 33, 32, 19, 21, -1, -1, 85 },
{ 34, 33, 20, 22, -1, -1, 97 },
{ -1, 34, 21, -1, -1, -1, 110 },
{ 35, -1, -1, 24, 11, 10, 1 },
{ 36, 35, 23, 25, 12, 11, 4 },
{ 37, 36, 24, 26, 13, 12, 8 },
{ 38, 37, 25, 27, 14, 13, 17 },
{ 39, 38, 26, 28, 15, 14, 30 },
{ 40, 39, 27, 29, 16, 15, 42 },
{ 41, 40, 28, 30, 17, 16, 53 },
{ 42, 41, 29, 31, 18, 17, 63 },
{ 43, 42, 30, 32, 19, 18, 73 },
{ 44, 43, 31, 33, 20, 19, 84 },
{ 45, 44, 32, 34, 21, 20, 96 },
{ -1, 45, 33, -1, 22, 21, 109 },
{ 46, -1, -1, 36, 24, 23, 3 },
{ 47, 46, 35, 37, 25, 24, 7 },
{ 48, 47, 36, 38, 26, 25, 16 },
{ 49, 48, 37, 39, 27, 26, 29 },
{ 50, 49, 38, 40, 28, 27, 41 },
{ 51, 50, 39, 41, 29, 28, 52 },
{ 52, 51, 40, 42, 30, 29, 62 },
{ 53, 52, 41, 43, 31, 30, 72 },
{ 54, 53, 42, 44, 32, 31, 83 },
{ 55, 54, 43, 45, 33, 32, 95 },
{ -1, 55, 44, -1, 34, 33, 108 },
{ 56, -1, -1, 47, 36, 35, 6 },
{ 57, 56, 46, 48, 37, 36, 15 },
{ 58, 57, 47, 49, 38, 37, 28 },
{ 59, 58, 48, 50, 39, 38, 40 },
{ 60, 59, 49, 51, 40, 39, 51 },
{ 61, 60, 50, 52, 41, 40, 61 },
{ 62, 61, 51, 53, 42, 41, 71 },
{ 63, 62, 52, 54, 43, 42, 82 },
{ 64, 63, 53, 55, 44, 43, 94 },
{ -1, 64, 54, -1, 45, 44, 107 },
{ 66, 65, -1, 57, 47, 46, 14 },
{ 67, 66, 56, 58, 48, 47, 27 },
{ 68, 67, 57, 59, 49, 48, 39 },
{ 69, 68, 58, 60, 50, 49, 50 },
{ 70, 69, 59, 61, 51, 50, 60 },
{ 71, 70, 60, 62, 52, 51, 70 },
{ 72, 71, 61, 63, 53, 52, 81 },
{ 73, 72, 62, 64, 54, 53, 93 },
{ 74, 73, 63, -1, 55, 54, 106 },
{ 76, 75, -1, 66, 56, -1, 13 },
{ 77, 76, 65, 67, 57, 56, 26 },
{ 78, 77, 66, 68, 58, 57, 38 },
{ 79, 78, 67, 69, 59, 58, 49 },
{ 80, 79, 68, 70, 60, 59, 59 },
{ 81, 80, 69, 71, 61, 60, 69 },
{ 82, 81, 70, 72, 62, 61, 80 },
{ 83, 82, 71, 73, 63, 62, 92 },
{ 84, 83, 72, 74, 64, 63, 105 },
{ 85, 84, 73, -1, -1, 64, 114 },
{ 87, 86, -1, 76, 65, -1, 12 },
{ 88, 87, 75, 77, 66, 65, 25 },
{ 89, 88, 76, 78, 67, 66, 37 },
{ 90, 89, 77, 79, 68, 67, 48 },
{ 91, 90, 78, 80, 69, 68, 58 },
{ 92, 91, 79, 81, 70, 69, 68 },
{ 93, 92, 80, 82, 71, 70, 79 },
{ 94, 93, 81, 83, 72, 71, 91 },
{ 95, 94, 82, 84, 73, 72, 104 },
{ 96, 95, 83, 85, 74, 73, 113 },
{ 97, 96, 84, -1, -1, 74, 117 },
{ 99, 98, -1, 87, 75, -1, 11 },
{ 100, 99, 86, 88, 76, 75, 24 },
{ 101, 100, 87, 89, 77, 76, 36 },
{ 102, 101, 88, 90, 78, 77, 47 },
{ 103, 102, 89, 91, 79, 78, 57 },
{ 104, 103, 90, 92, 80, 79, 67 },
{ 105, 1
没有合适的资源?快使用搜索试试~ 我知道了~
J2ME嵌入式开发案例精解
共113个文件
java:76个
class:14个
jad:7个
需积分: 10 56 下载量 63 浏览量
2009-10-25
12:29:11
上传
评论
收藏 232KB RAR 举报
温馨提示
J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解J2ME嵌入式开发案例精解
资源推荐
资源详情
资源评论
收起资源包目录
J2ME嵌入式开发案例精解 (113个子文件)
GameMap.class 20KB
CalculatorMIDlet.class 4KB
CalculatorMIDlet.class 4KB
CalcCanvas.class 4KB
CalcCanvas.class 4KB
ChineseChecker.class 3KB
MoveStack.class 2KB
MyCanvas.class 1KB
MyCanvas.class 1KB
CalcMIDlet.class 963B
CalcMIDlet.class 963B
GIFMIDlet.class 859B
GIFMIDlet.class 859B
Move.class 303B
chinesechecker.dep2 7KB
ChineseChecker_MIDP1.jad 275B
ChineseChecker2.jad 259B
ChineseChecker.jad 258B
Calculator.jad 242B
Calc.jad 212B
GIF.jad 207B
ChineseChecker.jad 58B
ChineseChecker2.jar 13KB
ChineseChecker.jar 13KB
ChineseChecker_MIDP1.jar 13KB
GameMap.java 28KB
FileExplorer.java 13KB
HttpTransfer.java 9KB
MailDeliveryMIDlet.java 6KB
MailCheckMIDlet.java 6KB
ObexFileReceiver.java 5KB
CalcCanvas.java 5KB
Module.java 5KB
ObexFileSender.java 5KB
ContactListForm.java 4KB
GetRemoteDevice.java 4KB
Element.java 4KB
XmlParser.java 4KB
myXMLParser.java 4KB
OBEXClient.java 3KB
Stock.java 3KB
CheckMailServlet.java 3KB
OBEXServer.java 3KB
HttpImage.java 3KB
CalculatorMIDlet.java 3KB
Node.java 3KB
SocketTransfer.java 3KB
VideoMIDlet.java 3KB
pingMIDlet.java 3KB
PIM.java 3KB
content_UI.java 3KB
MainMenu.java 3KB
PianoCanvas.java 3KB
XmlConstant.java 2KB
PersonaStock.java 2KB
PieCanvas.java 2KB
StockPrice.java 2KB
AddStock.java 2KB
AlertsModule.java 2KB
XmlInputer.java 2KB
UDPClient.java 2KB
SendMailServlet.java 2KB
StockInfoManager.java 2KB
info.java 2KB
UDPServer.java 2KB
PriceAlerts.java 2KB
Dict.java 2KB
NetTransferMIDlet.java 2KB
VolumeController.java 2KB
CheckStock.java 2KB
Word.java 2KB
infoParser.java 2KB
zoom.java 2KB
ChineseChecker.java 2KB
search_en_UI.java 2KB
addWord_UI.java 2KB
AddAlert.java 2KB
MainMenu.java 2KB
AnalyseCanvas.java 2KB
OBEXTransferMIDlet.java 2KB
UDPTransfer.java 2KB
GIFMIDlet.java 1KB
locationMidlet.java 1KB
CustomItem.java 1KB
GetLocalDevice.java 1KB
Alert.java 1KB
search_ch_UI.java 1KB
PieMIDlet.java 1KB
BaseXmlParser.java 1KB
StockConnection.java 1KB
StockModule.java 1KB
MyCanvas.java 978B
BaseXmlInputer.java 948B
VideoCanvas.java 936B
MoveStack.java 845B
Property.java 770B
CalcMIDlet.java 711B
Document.java 684B
PianoMIDlet.java 571B
GIFMIDlet.java 437B
共 113 条
- 1
- 2
资源评论
zhyf918
- 粉丝: 4
- 资源: 40
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功