文件名称:huarongdao
介绍说明--下载内容来自于网络,使用问题请自行百度
Java两个华容道游戏源码文件,使用了Java中的applet和awt技术,主要是练手的。通过一些小游戏的编写,让你了解更多的Java小知识,快速进入Java编程殿堂。在本游戏中,自编写了一个代表华容道人物的类,实现华容道游戏中人物的构造,画出华容道的边界,提示曹操逃出位置和按键规则,点击相应的人物,然后按键盘上的上下左右箭头移动,判断是否和其它人物或下边界出现重叠,如果出现重叠就退回50个单位距离。。
编程思路:因为要实现华容道游戏中人物的构造,所以首先要生成表示人物的矩形块,这是通过语句Rectangle rect=null实例化Rectangle类,然后在People类的构造函数里通过语句rect=new Rectangle(x,y,w,h)实现有戏中人物的构造。然后实现人机交互的效果,所以要响应当前光标的焦点事件,通过public void focusGained(FocusEvent e)函数得到焦点-Puzzle two Java source files, using a Java applet and awt in technology, mainly practiced hand. Written by some small game, so you learn more knowledge of Java applets, Java programming quickly into the hall. In this game, since the preparation of a character s class representatives Huarong, Huarong realize the characters in the game structure, Huarong draw boundaries, position and key tips to escape Cao Cao rules, click on the appropriate characters, and then press the keyboard the up and down arrows to move, and the other person or to determine whether the lower boundary overlap, the overlap would be returned if 50 units of distance. .
Programming ideas: To realize the structure of Huarong game characters, so the first character to generate said rectangular block, which is by the statement Rectangle rect = null instantiated Rectangle class, then class s constructor People by statements rect = new Rectangle (x, y, w, h) to achieve the structure Me characters. Then achieve the effect
编程思路:因为要实现华容道游戏中人物的构造,所以首先要生成表示人物的矩形块,这是通过语句Rectangle rect=null实例化Rectangle类,然后在People类的构造函数里通过语句rect=new Rectangle(x,y,w,h)实现有戏中人物的构造。然后实现人机交互的效果,所以要响应当前光标的焦点事件,通过public void focusGained(FocusEvent e)函数得到焦点-Puzzle two Java source files, using a Java applet and awt in technology, mainly practiced hand. Written by some small game, so you learn more knowledge of Java applets, Java programming quickly into the hall. In this game, since the preparation of a character s class representatives Huarong, Huarong realize the characters in the game structure, Huarong draw boundaries, position and key tips to escape Cao Cao rules, click on the appropriate characters, and then press the keyboard the up and down arrows to move, and the other person or to determine whether the lower boundary overlap, the overlap would be returned if 50 units of distance. .
Programming ideas: To realize the structure of Huarong game characters, so the first character to generate said rectangular block, which is by the statement Rectangle rect = null instantiated Rectangle class, then class s constructor People by statements rect = new Rectangle (x, y, w, h) to achieve the structure Me characters. Then achieve the effect
(系统自动生成,下载前可以参看下载内容)
下载文件列表
练习95华容道(一)/HuaRongRoad.class
练习95华容道(一)/HuaRongRoad.html
练习95华容道(一)/HuaRongRoad.java
练习95华容道(一)/People.class
练习95华容道(一)/_desktop.ini
练习95华容道(一)/练习95华容道(一).doc
练习96华容道(二)/HuaRongRoad.class
练习96华容道(二)/HuaRongRoad.html
练习96华容道(二)/HuaRongRoad.java
练习96华容道(二)/People.class
练习96华容道(二)/_desktop.ini
练习96华容道(二)/练习96华容道(二).doc
练习95华容道(一)
练习96华容道(二)
练习95华容道(一)/HuaRongRoad.html
练习95华容道(一)/HuaRongRoad.java
练习95华容道(一)/People.class
练习95华容道(一)/_desktop.ini
练习95华容道(一)/练习95华容道(一).doc
练习96华容道(二)/HuaRongRoad.class
练习96华容道(二)/HuaRongRoad.html
练习96华容道(二)/HuaRongRoad.java
练习96华容道(二)/People.class
练习96华容道(二)/_desktop.ini
练习96华容道(二)/练习96华容道(二).doc
练习95华容道(一)
练习96华容道(二)
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.