Coding challenge question

This is a discussion on "Coding challenge question" within the JavaScript Forum section. This forum, and the thread "Coding challenge question are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 29th, 2007, 16:58
New Member
Join Date: Sep 2007
Location: georgia
Age: 25
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Coding challenge question

Javascript coding challenge - I saw this on a coding forums website and everyone is struggling. Any Ideas?

Two players play the game. Each player takes a turn that lasts 30 seconds.

On each turn, the player is to "tag" an asterisk(*) on the screen that starts on the left-hand side of the screen and travels across the screen and back. The asterisk begins at the far left of the screen and travels across ten different points on the screen until it rach the far right side of the screen, then return to the left of the screen. The player "tags" the asterisk by clicking a button or clicking text "Tag". The further the asterisk is to the right of the screen, the more points are scored when a player "tags" the asterisk. When the asterisk is "tagged" the player receives the point value associated with the position on the screen. Each point value shoul dbe clearly displayed next to its position.

The game is started when a "start" button or text(as in a P tag) is clicked. The game should go for 5 turns each player, then end and display the winner. It should be clear at all times whose turn it is: player 1 or player 2. You can restart the game by either refreshing the browser, or clicking a "new game" button, then clicking "start".

When the browser loads, the asterisks will start at the left-hand side of the screen and travel 10 positions to the right and then travels 10 positions back. Position 1 is worth 1 point, poistion 2 is worth 2 points, etc. up to position 10 which is worth 10 points. The player must click the "Tag" button to get points, so it is worth more point to click the button the further to the right the asterisk is. The goal is to get the most points within 30 seconds.


Hints:

Use a one second timer to count down the game time(30 seconds per turn)
Use a faster timer to change the position of the asterisks
Use P tag or DIV tags to hold and update the score for each player
Reply With Quote

  #2 (permalink)  
Old Sep 30th, 2007, 01:50
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Coding challenge question


sounds a bit pointless to me.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone up for a little challenge? HelpMePlease Web Page Design 5 Mar 6th, 2008 15:11
MySpace.... Come say hello! (Will you take the challenge?) Rob Webforumz Cafe 20 Aug 6th, 2007 21:18
Anyone up for a CSS challenge? bob_visualefx Web Page Design 7 Apr 7th, 2006 14:30


All times are GMT. The time now is 19:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43