文件名称:99
介绍说明--下载内容均来自于网络,请自行研究使用
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
..........\PICTURE1.JPG
..........\PICTURE2.GIF
..........\pintu.class
..........\pintu.html
..........\pintu.java
..........\_desktop.ini
..........\练习99拼图.doc
练习99拼图