Question 12
AQA Computer Science November 2021 Paper 1 (7517/1)A level6 marks
On the specification
- 12.1
- 3.1 Fundamentals of programming
- 12.2
- 3.3 Systematic approach to problem solving
Question text
12 This question refers to the subroutine DestroyPiecesAndCountVPs in the HexGrid class. The victory point scoring system for the game is to be changed so that at the end of each turn both players gain additional victory points based on how many LESS pieces they have on the board. What you need to do Task 1 Modify the subroutine DestroyPiecesAndCountVPs so that if a piece has not been destroyed it checks to see if it is a LESS piece. If it is a LESS piece the number of victory points awarded to the player to whom that piece belongs should be increased by one. Task 2 Test that the changes you have made work: • run the Skeleton Program • choose to load a game • enter the filename game1.txt • keep pressing the Enter key until both players have had a turn and the grid has been shown at the start of Player One’s second turn. Evidence that you need to provide Include the following evidence in your Electronic Answer Document. 12.1 Your PROGRAM SOURCE CODE for the amended subroutine DestroyPiecesAndCountVPs. [5 marks] 12.2 SCREEN CAPTURE(S) showing the results of the requested test. [1 mark]