Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Please Help me
12-11-2010, 12:58 PM #1
- Join Date
- Dec 2010
- Thanked 0 Times in 0 Posts
Please Help me
Write a java script program that will utilize events, functions, and random number generation to simulate the following game:
• The game is presented as a square table with 9 pictures embedded inside a form. These pictures
are pieces of a complete car picture.
• The pictures are named 1.jpg, 2.jpg … 9.jpg.
• The game begins by clicking on a Start button
• Once the Start button is clicked the pictures in the table will be randomly rearranged.
• You win the game by rearranging the pictures in an ordered manner so as the complete picture of
the car will be produced.
• This is accomplished by clicking two pictures to swap them. This step will be repeated until the
table is rearranged.
• The two clicked pictures must be adjacent horizontally or vertically but not diagonally. If the user
clicks on two diagonally adjacent pictures then nothing will happen.
• The game must be completed within a certain amount of time for example 30 seconds.
• You can create three levels of difficulty depending on the time given to solve it. For example a
beginner is given 60 seconds, an intermediate user is given 45 seconds and an advanced user is
given 30 seconds to complete it.
Write a program that will implement the game in a presentable manner using the techniques learned in class.
12-11-2010, 01:21 PM #2
- Join Date
- Apr 2003
- Bucharest, ROMANIA
- Thanked 379 Times in 375 Posts