Office中国论坛/Access中国论坛

标题: 有点难度,VBA编个猜单词游戏(我的作业),高手来帮忙 [打印本页]

作者: looky    时间: 2006-1-9 06:03
标题: 有点难度,VBA编个猜单词游戏(我的作业),高手来帮忙
题目如下:

Coursework Assignment 2005-6

The assignment for this module requires you to produce a variation on the popular game of ‘hangman’.

In the basic game, the computer selects a word randomly from a maintained list and displays the word with the letters obscured. The user is invited to guess a letter. If the letter is present in the word, all occurrences of that letter are displayed. If the guessed letter is not present then a component of a picture of a ‘hanging man’ is added to the display. The object of the game is to reveal all letters of the word before the picture is complete.

The assignment requires an extended version of the game, which adds the following features:

Prior to the game starting, the user is prompted for their name. This is stored to a database table along with their best scores for a particular category and difficulty level (see below). Before they commence the game, their best score for the difficulty level and category is displayed.

Words are stored with difficulty and category information. Phrases are also permitted (multiple words separated by spaces). When the game commences, the human player is invited to select a difficulty level, and may elect to select words or phrases from a particular category or all categories. Example categories might be ‘First Names’, ‘Computing Terms’, ‘Football Teams’ etc.

Words and phrases may have a ‘clue’ associated with them. Players can elect to display a clue when they only have ONE guess remaining. This is visually indicated to the player.

An ‘administrative’ interface is provided to permit words and phrases to be added to the system under category headings. The difficulty of a particular word or phrase is automatically assessed through its length and the number of vowels that it contains (using a sensible algorithm). The administrative interface also allows the administrator to view the average scores of a selected player by category and difficulty level.

Guidance

The ‘hangman’ picture should be constructed using multiple Image components available within Access. Individual images can be invisible (visible=false) until a guess is incorrect. Pictures for the individual images can be constructed using MS Paint or a similar package. You may wish to defer this part of the assignment until you have completed work on components later in the module (meantime, simply count the incorrect guesses).

All of your work with underlying database tables must be completed programmatically, without using the data-binding features of Access. ONE exception to this rule is the reporting aspect of the problem for which your solution may construct SQL statements to query the database. Again, you will probably wish to defer this section of the problem until the relevant section of the course has been completed.


简单的说: 首先有个数据库,保存用户信息和单词。单词分难度和种类分类。

玩家进去就可以输入姓名,然后选择难度和种类开始游戏,程序根据难度和种类随机找个符合要求的单词出来。

然后单词会被隐藏,就是大家都玩过的猜单词,随便说ABCD,有的话就显示那个字母,没有的话就有个上吊的人的图片,显示其中一部分,直到图片全部显示,游戏就结束,或者玩家猜对全部字母,然后可以记录玩家得分。

平时不听讲,现在完全没有头绪了,大家帮忙啊,或者谁能帮我做的,RMB报酬喔,时间紧迫了,呵呵,后天要交
作者: ganrong    时间: 2006-1-9 10:37
提示: 作者被禁止或删除 内容自动屏蔽
作者: looky    时间: 2006-1-9 12:59
现在对我这个菜鸟来说的主要问题:(看了别笑我)

1,窗体连接数据库的问题。实在不知道如何设计是用户进去先可以输入名字然后录入数据库,同时游戏结束还可以把分数排名。

2,游戏开始的时候该用什么样的方法让用户选择难度。我现在用的是组合框选择难度和种类,不过似乎不太好

3,用什么样的方法让字母开始的时候隐藏,怎么掩藏。。。我想是不是用下划线代替,但是不知道如何实现

4,用户猜个字母,如果输入呢?我开始是打算做26个字母的按钮,每个只能按一次,不过似乎很麻烦。。。

还有很多问题啊。。。谁能给个清晰的思路




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3