Software Artisans, Inc. AspJeopardy game with Source Code
(Turn on Word Wrap to view this file.)
Contained in this directory is the source code for the AspJeopardy game that was played at the WROX Conference in Washington, DC in September 1999 and again at the ASP DevCon in Atlanta in October 1999.
A great time was had by all (especially when the attached ASP code crashed), and more than $25000 worth of prizes was given out at the two shows. While the first version in Washington crashed frequently, the only crashes in Atlanta were due to finger fumbles. The code is by no means production quality, but it works, generally.
Topics in this README:
- The Game
- To Install the Game
- To Play the Game
- How the Database Works
- List of Files and a Brief Explanation
- Legal Information
-------------------------------------------
The Game:
The game is styled after the popular Jeopardy TV Game show. It is meant to be used by a moderator with a web browser, not as a network style game. Playing as a network style game is left as an exercise for the reader :-).
The game is meant to be played as four rounds, with four categories. The game supports an unlimited number of contestants per round, though four contestants were used at the conferences.
-------------------------------------------
To Install the game:
1) Copy all the files in this directory to a location on your web server (e.g. c:\inetpub\aspjeopardy)
2) Create a virtual directory called /AspJeopardy and point it to the location created in step (1)
That's it. The database, AspJeopardy.mdb, will be found by using Server.MapPath, so there is no need to create an ODBC datasource.
-------------------------------------------
To Play the Game:
1) Browse to http://<yourserver>/AspJeopardy
2) Choose "Reset game" to clear out any old contestants, used categories, random daily doubles, etc.
3) Go back to the main page, and select "Manage Contestants" to add contestants.
4) Go back to the main page, and play a low value game
4.1) When you hit a daily double, fill in the amount the contestant bets and be sure to select the contestant, or it will fail. Hit the back button and try again if this happens.
5) At the end of each game, go back to manage contestants, delete the old contestants and add new ones.
6) After four low value rounds, play a high value round.
7) Give out prizes and drink.
-------------------------------------------
How the database works - how do I change questions?:
There are five simple tables in the database:
Categories: contains the category names. The ColumnInUse field has three possible value ranges:
0 - category never been used
1-n - category is being used in the current game, where n is column number of the category in the main Jeopardy question grid
99 - category has been used in a previous round of this set of games
Contestants: the list of contestants currently playing. Contestants are not kept permanently or between games, so there is no current support for keeping long term scores here. That should be in a separate table anyway.
Gameconfig: a table to put desired configuration information. Not currently used, I think.
Questions: the complete table of questions. Here are the fields:
ID - unique Id of the question
Question - the response that the player is expected to give (this is Jeopardy, after all)
Answer - the text that is displayed on the question grid
Category - index into the Categories table
PriceId - index into the QuestionValues table
Used - has the question been used?
DailyDouble - is this question the daily double. When a new game is started the dailydouble is generated randomly.
QuestionValues:
PriceId
QuestionValue. During the high-value game, only categories which contain questions whose value PriceId >= 4 will be displayed.
-------------------------------------------
List of Files and a Brief Explanation:
adovbs.inc - standard ADO include file
aspjeopardy*.mdb - the database. Two slightly different question sets were used at the different shows.
contestants.asp - manage contestants
dailydouble.asp - handles all daily double processing
default.htm - main intro page
endgame.asp - called when there are no more questions in the round. Display sorted list of contestants by winnings. Updates categories so the same category is not displayed again in another round.
game.asp - displays the main game grid and current contestant positions. Will redirect to endgame.asp if necessary.
judge.asp - not used
reset.asp - resets the database to a clean state. Use before every set of rounds
rules.htm - the rules. The prizes changed at the different shows.
showanswer.asp - from showq.asp, allows you to display what the contestant should've said
showq.asp - displays the answer. Will redirect to the dailydouble if necessary. When selecting a contestant, there are three choices: the contestant was right, the contestant was wrong, or there was a time out.
test.asp - not used.
The entire game works by passing QueryString values around. There are no Session variables. Here are some of the QueryStrings and where they are used:
game = {low, high} (game, showq, dailydouble) - low or high value game
contestantid = {contestantid} (showq) - which contestant answered
questionid = {questionid} (showq, dailydouble) - what is the Id of the current question
bet = {currency value} (showq) - what did the contestant bet in the daily double
reset = { non-null } - start a new round (game)
All timing for responses is external. There is a bunch of JavaScript code in showq.asp to allow the game to perform timing, but we didn't like the user interface, so it was nixed.
-------------------------------------------
Legal Information:
Software Artisans� AspJeopardy SOURCE CODE PRODUCT TERMS AND CONDITIONS
Supplied by:
Software Artisans, Inc. ("SAI")
1330 Beacon Street
tel: +1 (617) 738-0777 fax: +1 (617) 738-6278
email: info@softartisans.com
http://www.softartisans.com
THIS SOURCE CODE PRODUCT IS WARRANTED, IF AT ALL, IN ACCORDANCE WITH THE TERMS OF THE LICENSE AGREEMENT WRITTEN AGREEMENT BETWEEN YOU AND SAI. EXCEPT AS SET FORTH IN SUCH LICENSE AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED, AND THIS PRODUCT IS PROVIDED "AS IS." BECAUSE SOME STATES DO NOT ALLOW THESE EXCLUSIONS IN CERTAIN CIRCUMSTANCES, THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
IN NO EVENT SHALL SAI OR ITS SUPPLIERS BE LIABLE FOR SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, DAMAGES FOR LOSS OF BUSINESS PROFITS WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, EVEN IF SAI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES IN CERTAIN CIRCUMSTANCES, THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
Software Artisans is a trademark of Software Artisans, Inc. Software and related documentation are protected by US and international copyright law and treaties. Copyright � 1999, 2000 Software Artisans, Inc. All rights reserved.
asp游戏简单,方便整合
3星 · 超过75%的资源 需积分: 12 17 浏览量
2009-01-16
14:17:33
上传
评论
收藏 96KB ZIP 举报
qiu621
- 粉丝: 4
- 资源: 73
最新资源
- 基于C和C++的二维绘制工具设计源码 - DrawPro
- Object.defineProperty 的 IE 补丁object-defineproperty-ie-master.zip
- 整卷预览.mhtml
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见
- MySQL是一种广泛使用的开源关系型数据库管理系统,它提供了丰富的SQL语句用于数据库的创建、查询、更新和管理 以下是一些常见的
- 基于Javascript的结婚请帖设计源码 - Invitation
- mysql语句大全及用法
- mysql语句大全及用法
- mysql语句大全及用法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈