首页 > > 详细

data编程讲解、辅导Java编程、Python,c++程序讲解 辅导R语言编程|讲解留学生Prolog

项目预算:   开发周期:  发布时间:   要求地区:
Turn over ►
1 7 This question will further change the rules of the game.
When a piece is promoted to a dame, the player who the new dame belongs to now
chooses one of the opponent’s pieces. This piece is removed from the board and the
dame is placed in the square the removed piece was in.
1 7 . 1 State the identifier of the data structure that now needs to be passed as a parameter
into the subroutine MoveDame.
[1 mark]
What you need to do:
Task 1
Amend the subroutine MoveDame.
This subroutine is to:
• ask the player the piece ID of the opponent’s piece they want to remove
• check that the piece is an opponent’s piece and is on the board
• remove the opponent’s piece
• return the coordinates for the new dame.
Task 2
Amend the calls to MoveDame from within the subroutine MovePiece.
You will need to amend the parameter list of the subroutine heading of MovePiece
and the call to MovePiece from within the subroutine MakeMove.
Task 3
Test that the changes you have made work by conducting the following test:
• run the program
• enter Y
• load game3.txt
• move a2 to row 7, column 0
• take piece b1
Task 4
• move b5 to row 0, column 3
• take piece a6
Question 17 continues on the next page
14
IB/M/Jun19/7516/1
END OF QUESTIONS
Evidence that you need to provide
Include the following evidence in your Electronic Answer Document.
1 7 . 2 Your PROGRAM SOURCE CODE for the entire subroutine MoveDame and the
entire subroutine MakeMove.
[9 marks]
1 7 . 3 SCREEN CAPTURE(S) showing the requested test including the board display after
piece b1 has been taken.
[1 mark]
1 7 . 4 SCREEN CAPTURE(S) showing the requested test including the board display after
piece a6 has been taken.
[1 mark]

软件开发、广告设计客服
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 9951568
© 2021 www.rj363.com
软件定制开发网!