Question 17

AQA Computer Science June 2019 Paper 1AS12 marks

On the specification

17.1
3.1 Fundamentals of programming3.2 Fundamentals of data structures
17.2
3.1 Fundamentals of programming
17.3
3.3 Systematic approach to problem solving
17.4
3.3 Systematic approach to problem solving
Question text

17 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. 17.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 Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 17.2 Your PROGRAM SOURCE CODE for the entire subroutine MoveDame and the entire subroutine MakeMove. [9 marks] 17.3 SCREEN CAPTURE(S) showing the requested test including the board display after piece b1 has been taken. [1 mark] 17.4 SCREEN CAPTURE(S) showing the requested test including the board display after piece a6 has been taken. [1 mark]