# A-level Computing/AQA/Paper 1/Skeleton program/2021

This is for the AQA A Level Computer Science Specification.

This is where suggestions can be made about what some of the questions might be and how we can solve them.

Please be respectful and do not vandalise the page, as this would affect students' preparation for exams!

## Section C Predictions

The 2021 paper 1 will contain 4 questions worth 13 marks.

• Question here
• Question here
• Question here
• Question here

## Section D Predictions

Programming Questions on Skeleton Program

• The 2020 paper 1 contained 4 questions: a 6 mark, an 8 mark question, a 11 mark question and one 12 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.
• The 2019 paper 1 contained 4 questions: a 5 mark, an 8 mark question, a 9 mark question and one 13 mark question - these marks include the screen capture(s), so the marks for the coding will be 1-2 marks lower.
• The 2018 paper 1 contained one 2 mark question, a 5 mark question, two 9 mark questions, and one 12 mark question - these marks include the screen capture(s).
• The 2017 paper 1 contained a 5 mark question, three 6 mark questions, and one 12 mark question.

### Display the tile numbers

Create a subroutine 'DrawGridWithTileNumbers' which will display the tile numbers on a grid to help the players identify each tile

eg for the default game:

```  0     1     2     3
4     5     6     7
8     9    10    11
12    13    14    15
16    17    18    19
20    21    22    23
24    25    26    27
28    29    30    31
```

C#:

Delphi/Pascal:

Java:

Python:

```  # In HexGrid Class
def DrawGridWithTileNumbers(self):
count = 0 # Used to count the tiles
Line = "" # Used to store the output
for x in range(0, 8):   # Runs through each tile line
for y in range(0, 4): # Runs through each column
if x % 2 == 0: # Checks if odd/even line
if y == 0: # Adds only 3 spaces to beginning if even line
Line = Line + "   " + str(count)
else:
Line = Line + "     " + str(count)
else:
Line = Line + str(count) +  "     "
count = count + 1
Line = Line + os.linesep
return Line

# In PlayGame Subroutine
while not (GameOver and Player1Turn):
print(Grid.GetGridAsString(Player1Turn))
print(Grid.DrawGridWithTileNumbers())
```

VB.NET:

Create a new method in the class HexGrid to allow you to easily recall the size:

```    Public Function GetGridSize()
Return Size
End Function
```

Add the following lines to Playgame (just before loop):

```
GridSize = Grid.GetGridSize
DrawGridWithTileNumbers(GridSize)
```

```    Sub DrawGridWithTileNumbers(GrideSize As Integer)

Dim Tile As Integer = 0
Console.WriteLine()

For i = 1 To GrideSize
If i Mod 2 = 0 Then
Console.Write("   ")
End If

For j = 1 To GrideSize / 2

If Tile < 10 Then
Console.Write("   " & Tile & "  ")
Else
Console.Write("  " & Tile & "  ")
End If

Tile = Tile + 1
Next

Console.WriteLine()
Next
Console.WriteLine()

End Sub
```

### Help Command

This question refers to the subroutine PlayGame.

Currently, the player can enter move, saw, dig, upgrade, or spawn as a command. The game is to be amended so that the player can enter a help command, which will show the list of commands they can enter. The help command should not impede the players commands. In other words, the player should be able to enter “help” and it should not be counted as one of the three commands the player enters.

C#:

Delphi/Pascal:

Java:

Python:

```    commandCount = 1
while commandCount < 4:
command = input("Enter command: ").lower()
if command == "help":
pass
else:
Commands.append(command)
commandCount = commandCount + 1
```

VB.NET:

```        Dim commandCount As Integer
Dim command As String
Dim commandList As New List(Of String)
commandCount = 0
While commandCount < 3
Console.WriteLine("Enter command: ")
If command = "help" Then
Console.WriteLine("The commands you can use are: move, dig, saw, spawn, upgrade")
Else
commandCount += 1
End If
End While
```

Create a new function to be called instead of default game or load game. This should allow the user to enter any even number and create a grid of that size. Each location in the grid should have a 25% chance of being a forest, 25% chance of being a peat bog and 50% chance of being a plain. The Barons should still start in the corners of the map as in the default game with a serf in an adjacent tile.

C#:

Delphi/Pascal:

Java:

Python:

```def AnyGridSize():
GridSize = int(input("Enter the grid size you would like to use (Must be an even number): "))
T = []
for i in range(GridSize * (GridSize//2)):
TempNum = random.randint(1,4)
if TempNum == 1:
T.append("#")
elif TempNum == 2:
T. append("~")
else:
T.append(" ")
Grid = HexGrid(GridSize)
Player1 = Player("Player One", 0, 10, 10, 5)
Player2 = Player("Player Two", 1, 10, 10, 5)
print(T)
print(Grid._Tiles)
Grid.SetUpGridTerrain(T)
Grid.AddPiece(False, "Serf", len(T) - 1 - GridSize)
return Player1, Player2, Grid

print("1. Default game")
print("3. Any size game")
print("Q. Quit")
print()

def Main():
Player1 = None
Player2 = None
Grid = None
Choice = ""
while Choice != "Q":
Choice = input()
if Choice == "1":
Player1, Player2, Grid = SetUpDefaultGame()
PlayGame(Player1, Player2, Grid)
elif Choice == "2":
PlayGame(Player1, Player2, Grid)
elif Choice == "3":
Player1, Player2, Grid = AnyGridSize()
PlayGame(Player1, Player2, Grid)
```

VB.NET:

### Add another command called teleport that allows any piece to move to any location, at a cost of three fuel

Describe the question here

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### Add another type of tile called ore (or other type of resource)

Currently there are 3 terrain types: field, peat bog, and forest. The new type of tile will have the \$ symbol and there will be 1 ore for every 10 tiles. 1 ore is worth 2 fuel.

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### Save Option.

My best guess is a way of saving the game; currently you can load game1.txt, but you can't save a game that you are playing. The text file gives us the format to use, so I think this is quite likely.

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### Game Over Bug

With this version, a player can trap their own baron to end the game. While this kind of makes sense, it is possible that they could ask you to make it so that at least one of the pieces that are trapping a baron must belong to the other player.

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### Land Mine

Currently, if your baron gets trapped (if the game is over), you can see exactly what is going on. A land mine could be placed on a tile, and hidden from both players, so that if your opponent steps on that tile, they lose that piece.

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New Piece Type

We have 4 piece types: baron, serf, LESS (Lumberjack), and PBDS (Peat digger). It is possible (especially if there are new terrains or resources), that they might ask you to create a new piece type.

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET:

### New question

Question description

C#:

Delphi/Pascal:

Java:

Python:

VB.NET: