文件名称:99
-
所属分类:
- 标签属性:
- 上传时间:2014-03-14
-
文件大小:796.53kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1)编程思路:本练习因为要制作拼图游戏,所以首先要实现图片的导入。这是通过getImage()函数来实现的,该函数有两个参数,第一个参数指明图片的路径,第二个参数指明图片的名称。然后,因为要实现图片摆放的随意性,所以要通过initgame()函数来实现。Initgame()函数是自写函数,在函数体内,通过调用Math.random()函数产生随机数,用来达到图片位置摆放的随意性和随机性。最后,因为要实现人机交互.,所以首先要通过一系列函数来实现对鼠标事件的监听和响应,这是通过函数addMouseListener(this) 和addMouseMotionListener(this)来完成的。这样程序会区分用户对鼠标不同的操作,正确执行相应的功能。-1) programming ideas: To make this exercise because the puzzle, so we must first realize the import of the picture. This is done by getImage () function to achieve, the function has two parameters, the first parameter indicates the path of the picture, and the second parameter specifies the name of the picture. Then, because the picture placed to achieve randomness, so to be achieved through initgame () function. Initgame () function is a self-written functions in vivo function by calling Math.random () function generates a random number used to reach the position of placing pictures arbitrariness and randomness. Finally, due to the realization of human-computer interaction., So the first thing to be achieved through a series of functions for monitoring and responding to mouse events, this is done by the function addMouseListener (this) and addMouseMotionListener (this) to complete. This program will distinguish the different users of the mouse operation, the correct implementation of
(系统自动生成,下载前可以参看下载内容)
下载文件列表
练习99拼图/PICTURE0.JPG
练习99拼图/PICTURE1.JPG
练习99拼图/PICTURE2.GIF
练习99拼图/pintu.class
练习99拼图/pintu.html
练习99拼图/pintu.java
练习99拼图/_desktop.ini
练习99拼图/练习99拼图.doc
练习99拼图
练习99拼图/PICTURE1.JPG
练习99拼图/PICTURE2.GIF
练习99拼图/pintu.class
练习99拼图/pintu.html
练习99拼图/pintu.java
练习99拼图/_desktop.ini
练习99拼图/练习99拼图.doc
练习99拼图
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.