《程序設計課程設計》題目要求_第1頁
《程序設計課程設計》題目要求_第2頁
免費預覽已結束,剩余1頁可下載查看

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、程序設計課程設計題目要求本次課程設計要求同學們使用 編程語言,以面向對象編程方式,開發(fā)一個狐貍與獵狗棋、五子棋或黑白棋游戲。這三個游戲的規(guī)則見本文檔附件。開發(fā)分為兩個階段進行迭代,對每個階段的要求如下:1. 第一階段:為期 2 周a) 實現(xiàn)功能:1) 能夠提供圖形化界面供棋手下棋,推薦但不限定使用 ;2) 能夠實現(xiàn)人-人在同一臺機器上下棋,即不需要實現(xiàn)網絡對戰(zhàn),也不需要實現(xiàn)人機對戰(zhàn);3) 能夠判斷棋手所下的每一手棋是否合法;4) 局上繼續(xù)下棋。b) 提交制品:1) 源代碼:中間必須編寫有助于程序理解的注釋;2) 設計文檔:描述設計思路和方案,根據(jù)給定的模板寫。2. 第二階段:為期 2 周a)

2、實現(xiàn)功能:1) 能夠實現(xiàn)人機對戰(zhàn),但是不要求機器一定要每局都贏;2) 能夠對棋譜進行記錄,并能夠在棋盤上顯示棋譜;3) 棋之間的時間間隔。b) 提交制品:1) 源代碼:中間必須編寫有助于程序理解的注釋;2) 設計文檔:描述設計思路和方案,根據(jù)給定的模板寫;3) 總結文檔:對課程設計全過程的總結。同學們還可以在上述基礎上有選擇地設計并實現(xiàn)擴展功能,包括:1. 指定擴展功能:a) 換膚:更換棋盤背景和棋子形狀、顏色、圖案等;b) 回合限時:對每步棋限定時間,超時懲罰,例如判輸、隨機走棋,或者是空過等;c) 棋手等級管理:記錄每位棋手的輸贏局數(shù),并自定義等級評定等;d) 機器角色扮演:可以讓機器棋手

3、進行角色扮演,在人類棋手思考過程中出現(xiàn)對話,例如“快點呀!”“沒招了吧!”等??梢詤⒖既龂遄悠逯械念愃乒δ?。2. 其他自定義定擴展功能:這部分功能完全由個人發(fā)揮,沒有限制。而成。各部分所占比例如下:1. 平時成績:50%a) 第一階段提交制品:15%1) 程序設計質量:10%,考核依據(jù)為源代碼和設計文檔2) 程序編寫質量:,考核依據(jù)為源代碼b) 第二階段提交制品:25%1) 程序設計質量:15%,考核依據(jù)為源代碼和設計文檔2) 程序編寫質量:10%,考核依據(jù)為源代碼c) 學生參與課程的程度:10%2. 答辯成績:50%a) 程序演示:30%1) 實現(xiàn)第一階段與第二階段的所有功能:20%2)

4、實現(xiàn)擴展功能:10%b) 答辯:20%1) 宣講:10%2) 回答問題:10%c) 答辯形式:每位同學先進行自述,并演示程序,然后回答答辯委員組的提問。其中,自述和演示程序的時間為 10 分鐘,回答問題 10分鐘,共 20 分鐘。d) 其中指導教師占 60%,每個學生指導助教占 20%,其他所有助教占20%附件:三個棋類游戲的規(guī)則狐貍與獵狗棋(Fox and Hounds)以下內容來自維基百科 /wiki/Fox_and_houndsThis version (also called Wolf and Sheep, Hounds and Hare, or Devil andTailors) i

5、s played on an 88chess/checkerboard., and only the dark squares are used.The four hounds are initially placed on the dark squares at one edge of the board; thefox is placed on any dark square on the opposite edge. The objective of the fox is tocross from one side of the board to the other, arriving

6、at any one of the houndsoriginal squares; the hounds objective is to prevent it from doing so.The hounds move diagonally forward one square. The fox moves diagonally forwardor backward one square. There is, however, no jumping, promotion, or removal ofpieces. The play alternates with the fox moving

7、first. The player controlling thehounds moves only one of them per turn.The fox is trapped when a hound occupies all four of its potential move squares.Alternatively, two hounds may trap the fox against an edge of the board (other thantheir original home-row). There is even one corner (see diagram)

8、where a singlehound may do the trapping. It may be noted that should a hound reach the foxsoriginal home row, it will no longer have any potential moves.Perfect play will result in a hounds victory, even if the fox is allowed to choose anystarting square and to pass his turn once during the game.B.

9、五子棋(Gomoku)以下內容來自維基百科 /wiki/Gobangfrom: http:/www.gnustep.it/nicola/Applications/Gomoku/Gomoku is an abstract strategy board game. Also called Gobang or Five in a Row, itis traditionally played with Go pieces (black and white stones) on a go board (19x19intersections); however, because once placed,

10、pieces are not moved or removed fromthe board, gomoku may also be played as a paper and pencil game. This game isknown in several countries under different names.Black plays first, and players alternate in placing a stone of their color on an emptyintersection. The winner is the first player to get

11、an unbroken row of five stoneshorizontally, vertically, or diagonally.The name Gomoku is from the Japanese language, in which it is referred to asgomokunarabe (五目並). Go means five, moku is a counter word for pieces andnarabe means line-up. The game is also popular in Korea, where it is called omok(五

12、目) which has the same structure and origin as the Japanese name. It is saidto have originated in China with the name Wu Zi Qi (五子棋). In the nineteenthcentury, the game was introduced to Britain where it was known as Go Bang, said tobe a corruption of Japanese goban, said to be adopted from Chinese k

13、i pan (q bn)chess-boardC. 黑白棋(Reversi/Othello)以下內容來自維基百科 /wiki/ReversiReversi (marketed by Pressman under the trade name Othello) is a strategy boardgame for two players, played on an 8x8 board (similar to chess and checkers, with thetheoretically meaningless difference that the board in reversi is

14、usually monochromeaside from lines separating the individual squares).There are 64 identical pieces called disks (often spelled discs), which are light onone side and dark on the otherphysically with an actual set, or conceptually viacomputerto correspond with the opponents in a game. In most cases

15、a gameconsists of placing all of these up to a full board, but exceptions occur if neitherplayer has a legal move.Though the original rules of reversi were such that each player was limited to usingno more than half of the disks (those in possession at the start), this rule has long beenout of commo

16、n practice; and, if using a physical board and pieces, the player whoseturn it is simply retrieves a disk that is in possession of the opponent as needed. Thismeans that there is now only one way a player will pass (always involuntarily) ratherthan place a disk, while formerly there were two.Each players objective is generally to have as many disks ones own color at the endas possible and for ones opponent to have as few or, technically in consideration ofthe occasional game in which not all disks are placed, that the difference between thetwo should

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論