Simple Gobang game example developed and implemented by Android

This paper describes a simple Gobang game developed and implemented by Android. Share with you for your reference, as follows:

I just wrote a Gobang applet on Android. I'll share it with you here.

After writing, I feel that although the Android SDK also uses Java, it is still very different from java me.

First of all, the Android SDK does not implement all Java ME standards. The original applications running on KJava cannot run directly on Android.

In addition, the Android SDK has a large number of APIs that Android itself needs developers to understand.

The development framework of Android is also different from others, which needs to be learned.

I wrote this Gobang game with reference to the Android snake demo and other examples, plus my own needs.

It realizes the functions of chessboard, playing chess, judging win or lose, restarting and so on. At present, it does not realize the function of machine intelligent chess.

The touch screen function of Android is easy to use. The G1 demonstrated by others some time ago is easy to use, and the "window" window and "shade" curtain of Android, combined with touch, look very dazzling.

Er, gobang is also realized by using the touch screen. Click the seat on the chessboard and drop the chessboard.

First post a picture to see the effect.

OK, here's the code:

R.id.gobangview is the view defined in res.

Gobang view

PS: Here we recommend another Gobang game of JS version of our website for your reference (its AI is relatively simple)

Online Gobang game: http://tools.jb51.net/games/wuziqi

More readers interested in Android related content can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android debugging skills and common problem solving methods, summary of Android basic component usage, summary of Android view skills, summary of Android layout skills and summary of Android control usage

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>