0% found this document useful (0 votes)
19 views37 pages

Unit 1, 2015 MS

The document is the mark scheme for the AS Level Computing COMP1 exam from June 2015, detailing the assessment criteria and marking guidance for various questions. It outlines the standardization process for ensuring consistency in marking and includes specific marking notations and examples of acceptable answers. Additionally, it emphasizes that the mark scheme is a working document subject to updates based on student responses and clarifies copyright permissions for its use.

Uploaded by

jtcgamming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views37 pages

Unit 1, 2015 MS

The document is the mark scheme for the AS Level Computing COMP1 exam from June 2015, detailing the assessment criteria and marking guidance for various questions. It outlines the standardization process for ensuring consistency in marking and includes specific marking notations and examples of acceptable answers. Additionally, it emphasizes that the mark scheme is a working document subject to updates based on student responses and clarifies copyright permissions for its use.

Uploaded by

jtcgamming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

AS LEVEL

Computing
COMP1
Mark scheme

2510
June 2015

Version/Stage: V1 Final Mark Scheme


Mark schemes are prepared by the Lead Assessment Writer and considered, together with the
relevant questions, by a panel of subject teachers. This mark scheme includes any amendments
made at the standardisation events which all associates participate in and is the scheme which was
used by them in this examination. The standardisation process ensures that the mark scheme covers
the students’ responses to questions and that every associate understands and applies it in the same
correct way. As preparation for standardisation each associate analyses a number of students’
scripts. Alternative answers not already covered by the mark scheme are discussed and legislated
for. If, after the standardisation process, associates encounter unusual answers which have not been
raised they are required to refer these to the Lead Assessment Writer.

It must be stressed that a mark scheme is a working document, in many cases further developed and
expanded on the basis of students’ reactions to a particular paper. Assumptions about future mark
schemes on the basis of one year’s document should be avoided; whilst the guiding principles of
assessment remain constant, details will change, depending on the content of a particular
examination paper.

Further copies of this mark scheme are available from aqa.org.uk

Copyright © 2015 AQA and its licensors. All rights reserved.


AQA retains the copyright on all its publications. However, registered schools/colleges for AQA are permitted to copy material from this
booklet for their own internal use, with the following important exception: AQA cannot give permission to schools/colleges to photocopy any
material that is acknowledged to a third party even for internal use within the centre.
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Notation used in GCE Computing mark schemes:

; means a single mark


// means alternative response
/ means an alternative word or sub-phrase
A means acceptable creditworthy answer
R means reject answer as not creditworthy
I means ignore
NE means not enough

Qu Part Marking Guidance Marks


1 01 0011 0111; 1
1 02 37; 1
1 03 Easier for people to read/understand; R. implication that it is easier for MAX 1
computers
Can be displayed using fewer digits;
More compact when printed/displayed;
NE. Takes up less space
NE. More compact
R. Uses less storage space

1 04 1;1000101; 2

R. if not 8 bits
1 05 101.10100 2
R. if not 8 bits

Mark as follows:
3 bits before binary point correct;
5 bits after binary point correct;

Note for examiners


If the correct 8 bits are given (10110100) but with no binary point shown
award 2 marks (only if all 8 bits are correct – if no binary point shown and
any bit is incorrect then 0 marks)
Award 1 mark if correct value represented but binary point in wrong place
(e.g. 0101.1010)

1 06 011 0110; 1

R. if not 7 bits

1 07 128 // 1
27;

3 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

1 08 Use the AND operator; 2


with the 7-bit ASCII code and the bit pattern 000 1111; A. 1001111 A.
correct answers that use 8 bits instead of 7 bits A. denary/hexadecimal
equivalents to the bit pattern (15 / F)
//
Use the XOR operator; A. EOR operator
with the 7-bit ASCII code and the bit pattern 0110000;
A. correct answers that use 8 bits instead of 7 bits A.
denary/hexadecimal equivalents to the bit pattern (48 / 30)

Note for examiners


To get the 2nd mark point the bit pattern provided must work with the
logical bitwise operator stated in the answer

1 09 0011 0000; 1

1 10 Recalculate the values for the parity bits using the data bits received (and 4
compare these values with the parity bits received); A. check the parity
bits
Add up the bit positions of the parity bits where a parity checks fails // add
up the bit positions of the calculated parity bits that are different to those
received;
The bit position of where the error has occurred is indicated; R. positions
The contents of the indicated bit position are flipped; R. positions

1 11 7; 1

1 12 No; 1
1 13 2
Initial State Input New State
Sg 1 Sy;
Sy 0 Sy
Sy 1 Sy;

A. 2nd and 3rd rows swapped

//
Initial State Input New State
Sg 1 Sy;
Sy 0 or 1 Sy;

1 14 Works out if a given input is a (7-bit) ASCII code for a numeric character; 1

1 15 The arrow labelled with a 0 from state Sg should go to state Sj; 1

4 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

2 16 (Type of) shape // circle; MAX 3


Coordinates of centre/midpoint;
Identifier;
(Length of) radius/diameter;
Line colour // outer colour;
Line width;
Fill colour // inner colour;

NE. Position/coordinates
NE. Colour
NE. Size
NE. Centre/midpoint

2 17 The image is divided into pixels; MAX 3


Each possible colour is represented using a bit pattern // each pixel is
represented using the same number of bits;
Information is stored about the colour of each pixel;
The position of the pixel in memory determines its location in the image;
A. metadata will be stored about the image

2 18 (For geometric images) less storage space /memory likely to be needed; MAX 3
NE. less space
(For geometric images) will load faster (from secondary storage);
(For geometric images) will download faster;
Can be scaled/resized without distortion;
A. zoom
Image can be (more easily) searched for particular objects;
Can (more easily) manipulate individual objects in an image;
Can preserve the background so that it can be recreated if an object is
deleted;

3 19 5

IStr OStr Count


Lou 1
L 2
oL 3
uoL 4

Mark as follows:
1st column every cell left empty or contains the string Lou; NE. if no
attempt to complete question
1st value in the 2nd column is L;
2nd value in the 2nd column is oL;
3rd value in the 2nd column is uoL;
3rd column correct;
I. speech marks around strings
I. case of letters

5 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

4 20 1. Correct variable declarations for Prime, Count1 and Count2; 11

Note for examiners


If a language allows variables to be used without explicit declaration (eg
Python) then this mark should be awarded if the three correct variables
exist in the program code and the first value they are assigned is of the
correct data type

2. Correct output message The first few prime numbers are: ;


3. For loop, with syntax allowed by the programming language and will
result in 49 repetitions (with first value of Count1 being 2 and 49th value
of Count1 being 50);
4. Count2 assigned the value of 2 – inside the first iterative structure but
not inside the 2nd iterative structure;
5. Prime assigned the value of Yes – inside the first iterative structure
but not inside the 2nd iterative structure; I. order of the statements
assigning values to Prime and Count2
6. While loop, with syntax allowed by the programming language and
correct condition for the termination of the loop; A. alternative correct
logic for condition
7. 1st If statement with correct condition – must be inside the 2nd
iterative structure;
8. Prime being assigned the value No inside the selection structure;
9. Count2 incremented inside the 2nd iterative structure; R. if inside
selection structure
10. 2nd If statement with correct condition – must be in the 1st iterative
structure and not in the 2nd iterative structure;
11. Value of Count1 being outputted inside the 2nd selection structure;

A. Boolean data type for the variable Prime


I. Case of variable names, strings and output messages
A. Minor typos in variable names and output messages
I. spacing in prompts
A. initialisation of variables at declaration stage

4 21 ****SCREEN CAPTURE**** 1
Must match code from 20, including messages on screen capture
matching those in code. Code for 20 must be sensible.

Mark as follows:
Correct printed output - 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47; A. any suitable format for printed list of numbers

4 22 Create a new variable called Max; MAX 3


A. any identifier for the variable
A. no name specified for the variable
Output a message (asking the user to enter a maximum value);
Assign Max a value entered by the user;
Change the condition for the 1st iteration structure so that it loops while
Count1 is less than Max (instead of less than or equal to 50);

6 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

5 23 BoardDimension; 1

R. if any additional code


R. if spelt incorrectly
I. case

5 24 DisplayWhoseTurnItIs // DisplayWinner // DisplayBoard // 1


WriteWithMsg (VB6 only) // WriteLineWithMsg (VB6 only)//
WriteLine (VB6 only)// WriteNoLine (VB6 only)// ReadLine (VB6
only);

R. if any additional code


R. if spelt incorrectly
I. case

5 25 Board; 1

R. if any additional code


R. if spelt incorrectly
I. case

5 26 Delete the three lines and add one copy of the line after the If 1
statement(s);

5 27 If (PlayAgain contains) a lowercase letter; it is converted into 2


uppercase;
5 28 The 123 in the 2nd condition should be 122; A. Change <= 123 to <123 MAX 3
The 3rd column should have condition values of N and N // the 1st column
should have condition values of N and N;

There should only be an X in the last column; there should not be an X in


any of the first three columns; //
there should be a Y (A. other sensible indicator) in the last column; there
should be Xs (A. other sensible indicator) in the first three columns;

Note for examiners


Marks can be awarded for answers that show a corrected version of
Table 4. An example of a possible correct Table 4:

Conditions >=97 N N Y Y
<=122 N Y N Y
Action Change value of PlayAgain X

7 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

6 29 New variable NoOfMoves created with a numeric data type; 4


R. if spelt incorrectly I. case
Note for examiners
If a language allows variables to be used without explicit declaration (eg
Python) then this mark should be awarded if a variable exists in the
program code with the correct identifier and the first value it is assigned is
of the correct data type

NoOfMoves initialised to zero at the start of a game;


A. different identifier if matches identifier for variable created
R. at declaration unless declaration is done at start of game (not start of
program)

1 added to NoOfMoves after call to MakeMove;


A. different identifier if matches identifier for variable created
R. if adds 1 for an illegal move

Correct message The number of moves completed so far:


displayed after call to MakeMove followed by a number;
I. Case of output message
A. Minor typos in output message
I. spacing in output message

6 30 ****SCREEN CAPTURE**** 2
Must match code from 29, including prompts on screen capture matching
those in code. Code for 29 must be sensible.

1 BG BE BN BM BS BN BE BG

2 BR BR BR BR BR BR BR

3 BR

6 WR

7 WG WR WR WR WR WR WR WR

8 WE WN WM WS WN WE WG

1 2 3 4 5 6 7 8
Mark as follows:
Correct game position shown;
Correct message and value of 3 displayed;

8 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

7 31 IF statement with one correct condition; 4


IF statement with a second correct condition;
IF statement with all four correct conditions;
Value of False returned to calling routine correctly if a square is out of
bounds and value of False is still returned for all the original checks for
illegal moves and value True of is still returned for all legal moves;

A. two/four separate selection structures

Note: the four conditions are FinishRank > 8, FinishRank < 1,


FinishFile < 1 and FinishFile > 8 A. equivalent logic

Maximum of 3 marks if the code, when run, would still execute the line
IF Board[FinishRank][FinishFile][1]  "W" THEN in the
CheckMoveIsLegal subroutine when an out-of-bounds finish square is
entered

7 32 ****SCREEN CAPTURE**** 3
Must match code from 31, including prompts on screen capture matching
those in code. Code for 31 must be sensible.

Finish square of 98 followed by message saying That is not a


legal move – please try again;
R. if the code, when run, would still execute the line IF
Board[FinishRank][FinishFile][1]  "W" THEN in the
CheckMoveIsLegal subroutine when an out-of-bounds finish square is
entered

Finish square of 19 followed by message saying That is not a


legal move – please try again;
R. if the code, when run, would still execute the line IF
Board[FinishRank][FinishFile][1]  "W" THEN in the
CheckMoveIsLegal subroutine when an out-of-bounds finish square is
entered

9 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Finish square of 86 followed by board position below being displayed;


A. value entered for finish square not displayed as long as correct board
state is shown R. if no code in 31 that checks for FinishFile being
valid

1 BG BE BN BM BS BN BE BG

2 BR BR BR BR BR BR BR BR

6 WR

7 WR WR WR WR WR WR WR

8 WG WE WN WM WS WN WE WG

1 2 3 4 5 6 7 8
8 33 option for K added to case/if statement with call to 1
CheckSarrumMoveIsLegal; R. if any symbol other than K used

A. CheckKashshaptuMoveIsLegal (or similar) if evidence of creating


new subroutine (or renaming existing subroutine) included somewhere in
answer to question 8

8 34 1. White redum reaching 1st rank has symbol changed to K instead of M; 5

2. Added a selection structure with one of the following correct


conditions:
 checks for the piece in the start square being a K
 checks for finish square not being empty // checks for finish
square containing a black piece;

3. The additional selection structure has all necessary correct conditions


and the correct logic;

4. Statement that changes the colour of a black piece in the finish square
if it has been ‘captured’ by the kashshaptu - must be inside the selection
structure;

5. When a kashshaptu moves and the finish square did not contain a
black piece the contents of the start square become " " and if the
finish square did contain a black piece the contents stay as "WK";

10 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

8 35 ****SCREEN CAPTURE**** 3
Must match code from 33 and 34, including prompts on screen capture
matching those in code. Code for 33 and 34 must be sensible.

Finish square of 11 and board looks like diagram below;

1 WK BG BS WG

3 WS BE BE

6 BR

1 2 3 4 5 6 7 8

3rd move finish square is 21 and board looks like the diagram below;

1 WK WG BS WG

3 WS BE BE

6 BR

1 2 3 4 5 6 7 8

11 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

5th move has finish square of 22, board looks like diagram below and
message Black's sarrum has been captured. White wins!
is displayed;

1 WK WG WG

2 BS

3 WS BE BE

6 BR

1 2 3 4 5 6 7 8
9 36 1. New subroutine GenerateFEN created; R. if spelt incorrectly I. case 13

2. Correct parameters passed into the subroutine;

3. A string value will be returned by the subroutine; R. use of global


variable

4. FEN record will have a / at end of each rank;

5. FEN record uses upper case for white pieces;

6. FEN record uses lower case for black pieces;

7. Each piece on the board in the FEN record (even if incorrectly


represented eg WR instead of R);

8. Indicates where the empty spaces on the board are in the FEN record
(even if incorrect representation); A. Incorrect counts of empty spaces

9. FEN Record correctly use 8 for an empty rank; R. is any character


other than 8 in the FEN record for an empty rank

10. Correctly counts number of consecutive empty spaces // correctly


works out the number of consecutive empty spaces;

12 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

11. Count of empty spaces terminates at end of rank // calculation of


number of empty spaces does not go over more than one rank; R. if no
attempt to calculate/count number of empty spaces

12. FEN record shows whose move it is;

13. Accurate FEN record would be produced for every possible game
state;

9 37 Syntactically valid call to subroutine created in part 36; 3


Value returned by subroutine is displayed; R. use of global variable
Code for Task 2 added before the code asking the user to enter their
move;

9 38 ****SCREEN CAPTURE**** 2
Must match code from 36 and 37, including prompts on screen capture
matching those in code. Code for 36 and 37 must be sensible.

Mark as follows:
Sample game chosen and the FEN record returned/created by their
subroutine from part 36 is displayed;
Correct FEN record of 1g1s3G/R7/Se5e/8/8/7r/8/8/W is displayed;

13 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Pascal

Qu Part Marking Guidance Marks


4 20 Program Question4; 11
Var
Prime : String;
Count1 : Integer;
Count2 : Integer;
Begin
Writeln('The first few prime numbers are:')
For Count1 := 2 To 50
Do
Begin
Count2 := 2;
Prime := 'Yes';
While Count2 * Count2 <= Count1
Do
Begin
If (Count1 Mod Count2 = 0)
Then Prime := 'No';
Count2 := Count2 + 1
End;
If Prime = 'Yes'
Then WriteLn(Count1);
End;
ReadLn;
End.

6 29 Repeat 4
NoOfMoves := 0;
WhoseTurn := 'W';
...
Repeat
...
Repeat
...
Until MoveIsLegal;
MakeMove(Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn);
NoOfMoves := NoOfMoves + 1;
Writeln('The number of moves completed so far: ',
NoOfMoves:3:1);
If GameOver
...

7 31 ... 4
Var
PieceType : Char;
PieceColour : String;
MoveIsLegal : Boolean;

14 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Begin
MoveIsLegal := True;
If (FinishFile = StartFile) And (FinishRank = StartRank)
Then MoveIsLegal := False
Else
If (FinishFile > 8) Or (FinishFile < 1) Or
(FinishRank > 8) Or (FinishRank < 1)
Then MoveIsLegal := False
Else
Begin
PieceType := Board[StartRank, StartFile][2];
...

8 33 ... 1
'S', 'K' : MoveIsLegal := CheckSarrumMoveIsLegal(Board,
StartRank, StartFile, FinishRank, FinishFile);
...

8 34 ... 5
If (WhoseTurn = 'W') And (FinishRank = 1) And (Board[
StartRank, StartFile][2] = 'R')
Then
Begin
Board[FinishRank, FinishFile] := 'WK';
Board[StartRank, StartFile] := ' ';
End
Else
Begin
If (Board[StartRank, StartFile][2] = 'K') And
(Board[FinishRank, FinishFile] <> ' ')
Then Board[FinishRank, FinishFile] :=
Board[StartRank, StartFile][1] +
Board[FinishRank, FinishFile][2]
Else
If (WhoseTurn = 'B') And (FinishRank = 8) And
(Board[StartRank, StartFile][2] = 'R')
Then
Begin
Board[FinishRank, FinishFile] := 'BM';
Board[StartRank, StartFile] := ' ';
...

Alternative answer
...
If (WhoseTurn = 'W') And (FinishRank = 1) And (Board[
StartRank, StartFile][2] = 'R')
Then
Begin
Board[FinishRank, FinishFile] := 'WK';
Board[StartRank, StartFile] := ' ';
End

15 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Else
Begin
If (Board[StartRank, StartFile][2] = 'K') And
(Board[FinishRank, FinishFile] <> ' ')
Then Board[FinishRank, FinishFile] :=
'W' + Board[FinishRank, FinishFile][2]
Else
If (WhoseTurn = 'B') And (FinishRank = 8) And
(Board[StartRank, StartFile][2] = 'R')
Then
Begin
Board[FinishRank, FinishFile] := 'BM';
Board[StartRank, StartFile] := ' ';
...

9 36 Function GenerateFEN(Var Board : TBoard; WhoseTurn : Char) 13


: String;
Var
FEN : String;
RankNo : Integer;
FileNo : Integer;
NoOfSpaces : Integer;
Begin
FEN := '';
For RankNo := 1 To BoardDimension
Do
Begin
NoOfSpaces := 0;
For FileNo := 1 To BoardDimension
Do
Begin
If Board[RankNo, FileNo] = ' '
Then NoOfSpaces := NoOfSpaces + 1
Else
Begin
If NoOfSpaces > 0
Then
Begin
FEN := FEN +
IntToStr(NoOfSpaces)Temp;
NoOfSpaces := 0;
End;
If Board[RankNo, FileNo][1] = 'B'
Then FEN := FEN +
Chr(Ord(Board[RankNo, FileNo][2]) + 32);
Else FEN := FEN + Board[RankNo,
FileNo][2]
End;
End;
If NoOfSpaces > 0

16 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Then FEN := FEN + IntToStr(NoOfSpaces);


FEN := FEN + '/';
End;
FEN := FEN + WhoseTurn;
GenerateFEN := FEN;
End;

Alternative answer – converting to lower case


Else FEN := FEN + ansilowercase(Board[RankNo, FileNo][2]);

Alternative answer – using Str instead of IntToStr


Function GenerateFEN(Var Board : TBoard; WhoseTurn : Char)
: String;
Var
...
Temp : String;
Begin
...
Str(NoOfSpaces, Temp);
FEN := FEN + Temp;
...

9 37 ... 3
DisplayBoard(Board);
Writeln(GenerateFEN(Board, WhoseTurn));
DisplayWhoseTurnItIs(WhoseTurn);
...

17 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

VB.Net

Qu Part Marking Guidance Marks


4 20 Sub Main() 11
Dim Prime As String
Dim Count1 As Integer
Dim Count2 As Integer
Console.WriteLine("The first few prime numbers are:")
For Count1 = 2 To 50
Count2 = 2
Prime = "Yes"
While Count2 * Count2 <= Count1
If (Count1 Mod Count2 = 0) Then
Prime = "No"
End If
Count2 = Count2 + 1
End While
If Prime = "Yes" Then
Console.WriteLine(Count1)
End If
Next
Console.ReadLine()
End Sub

6 29 Do 4
NoOfMoves = 0
WhoseTurn = "W"
...
Do
...
Do
...
Loop Until MoveIsLegal
GameOver = CheckIfGameWillBeWon(Board, FinishRank,
FinishFile)
MakeMove(Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn)
NoOfMoves = NoOfMoves + 1
Console.WriteLine("The number of moves completed so
far: " & NoOfMoves)
If GameOver Then
...

7 31 ... 4
Dim PieceType As String
Dim PieceColour As String
If FinishFile = StartFile And FinishRank = StartRank Then
Return False
End If
If FinishFile > 8 Or FinishFile < 1 Or FinishRank > 8 Or

18 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

FinishRank < 1 Then


Return False
End If
PieceType = Board(StartRank, StartFile)(1)
...
8 33 ... 1
Case "S", "K"
Return CheckSarrumMoveIsLegal(Board, StartRank,
StartFile, FinishRank, FinishFile)
...
8 34 ... 5
If WhoseTurn = "W" And FinishRank = 1 And Board(StartRank,
StartFile)(1) = "R" Then
Board(FinishRank, FinishFile) = "WK"
Board(StartRank, StartFile) = " "
ElseIf Board(StartRank, StartFile)(1) = "K" And
Board(FinishRank, FinishFile) <> " " Then
Board(FinishRank, FinishFile) = Board(StartRank,
StartFile)(0) & Board(FinishRank, FinishFile)(1)
ElseIf WhoseTurn = "B" And FinishRank = 8 And
Board(StartRank, StartFile)(1) = "R" Then
Board(FinishRank, FinishFile) = "BM"
Board(StartRank, StartFile) = "
Else
Board(FinishRank, FinishFile) = Board(StartRank,
StartFile)
Board(StartRank, StartFile) = " "
End If
...

Alternative answer
...
If WhoseTurn = "W" And FinishRank = 1 And Board(StartRank,
StartFile)(1) = "R" Then
Board(FinishRank, FinishFile) = "WK"
Board(StartRank, StartFile) = " "
ElseIf Board(StartRank, StartFile)(1) = "K" And
Board(FinishRank, FinishFile) <> " " Then
Board(FinishRank, FinishFile) = "W" & Board(FinishRank,
FinishFile)(1)
ElseIf WhoseTurn = "B" And FinishRank = 8 And
Board(StartRank, StartFile)(1) = "R" Then
Board(FinishRank, FinishFile) = "BM"
Board(StartRank, StartFile) = "
Else
Board(FinishRank, FinishFile) = Board(StartRank,
StartFile)
Board(StartRank, StartFile) = " "
End If
...

19 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

9 36 Function GenerateFEN(ByVal Board(,) As String, ByVal 13


WhoseTurn As Char) As String
Dim FEN As String
Dim RankNo As Integer
Dim FileNo As Integer
Dim NoOfSpaces As Integer
FEN = ""
For RankNo = 1 To BoardDimension
NoOfSpaces = 0
For FileNo = 1 To BoardDimension
If Board(RankNo, FileNo) = " " Then
NoOfSpaces = NoOfSpaces + 1
Else
If NoOfSpaces > 0 Then
FEN = FEN & CStr(NoOfSpaces)
NoOfSpaces = 0
End If
If Board(RankNo, FileNo)(0) = "B" Then
FEN = FEN & Board(RankNo,
FileNo)(1).ToString.ToLower
Else
FEN = FEN & Board(RankNo, FileNo)(1)
End If
End If
Next
If NoOfSpaces > 0 Then
FEN = FEN & NoOfSpaces
End If
FEN = FEN & "/"
Next
FEN = FEN & WhoseTurn
Return FEN
End Function

9 37 ... 3
DisplayBoard(Board)
Console.WriteLine(GenerateFEN(Board, WhoseTurn))
DisplayWhoseTurnItIs(WhoseTurn)
MoveIsLegal = False
...

20 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

VB6

Qu Part Marking Guidance Marks


4 20 Private Sub Form_Load() 11
Dim Prime As String
Dim Count1 As Integer
Dim Count2 As Integer
WriteLine ("The first few prime numbers are:")
For Count1 = 2 To 50
Count2 = 2
Prime = "Yes"
While Count2 * Count2 <= Count1
If (Count1 Mod Count2 = 0) Then
Prime = "No"
End If
Count2 = Count2 + 1
Wend
If Prime = "Yes" Then
WriteLine (Count1)
End If
Next
End Sub

Alternative answers could use some of the following instead of


WriteLine:
Console.Text = Console.Text & ...
WriteLineWithMsg
WriteWithMsg
Msgbox
WriteNoLine

6 29 Do 4
NoOfMoves = 0
WhoseTurn = "W"
GameOver = False
...
Do
...
Do
...
Loop Until MoveIsLegal
GameOver = CheckIfGameWillBeWon(Board, FinishRank,
FinishFile)
Call MakeMove(Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn)
NoOfMoves = NoOfMoves + 1
WriteLine ("The number of moves completed so far: " &
NoOfMoves)
If GameOver Then
...

21 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

7 31 ... 4
MoveIsLegal = True
If FinishFile = StartFile And FinishRank = StartRank Then
MoveIsLegal = False
Else
If FinishFile > 8 Or FinishFile < 1 Or FinishRank > 8 Or
FinishRank < 1 Then
MoveIsLegal = False
Else
PieceType = Mid$(Board(StartRank, StartFile), 2, 1)
...

8 33 ... 1
Case "S", "K"
MoveIsLegal = CheckSarrumMoveIsLegal(Board, StartRank,
StartFile, FinishRank, FinishFile)
...

8 34 ... 5
If WhoseTurn = "W" And FinishRank = 1 And
Mid$(Board(StartRank, StartFile), 2, 1) = "R" Then
Board(FinishRank, FinishFile) = "WK"
Board(StartRank, StartFile) = " "
ElseIf Mid$(Board(StartRank, StartFile), 2, 1) = "K" And
Board(FinishRank, FinishFile) <> " " Then
Board(FinishRank, FinishFile) = Mid$(Board(StartRank,
StartFile), 1, 1) & Mid$(Board(FinishRank, FinishFile), 2,
1)
ElseIf WhoseTurn = "B" And FinishRank = 8 And
Mid$(Board(StartRank, StartFile), 2, 1) = "R" Then
Board(FinishRank, FinishFile) = "BM"
Board(StartRank, StartFile) = " "
Else
Board(FinishRank, FinishFile) = Board(StartRank,
StartFile)
Board(StartRank, StartFile) = " "
End If
...

Alternative answer
...
If WhoseTurn = "W" And FinishRank = 1 And
Mid$(Board(StartRank, StartFile), 2, 1) = "R" Then
Board(FinishRank, FinishFile) = "WK"
Board(StartRank, StartFile) = " "
ElseIf Mid$(Board(StartRank, StartFile), 2, 1) = "K" And
Board(FinishRank, FinishFile) <> " " Then
Board(FinishRank, FinishFile) = “W” &
Mid$(Board(FinishRank, FinishFile), 2, 1)
ElseIf WhoseTurn = "B" And FinishRank = 8 And
Mid$(Board(StartRank, StartFile), 2, 1) = "R" Then

22 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Board(FinishRank, FinishFile) = "BM"


Board(StartRank, StartFile) = " "
Else
Board(FinishRank, FinishFile) = Board(StartRank,
StartFile)
Board(StartRank, StartFile) = " "
End If
...

9 36 Private Function GenerateFEN(ByRef Board() As String, ByVal 13


WhoseTurn As String) As String
Dim FEN As String
Dim RankNo As Integer
Dim FileNo As Integer
Dim NoOfSpaces As Integer
FEN = ""
For RankNo = 1 To BoardDimension
NoOfSpaces = 0
For FileNo = 1 To BoardDimension
If Board(RankNo, FileNo) = " " Then
NoOfSpaces = NoOfSpaces + 1
Else
If NoOfSpaces > 0 Then
FEN = FEN & CStr(NoOfSpaces)
NoOfSpaces = 0
End If
If Mid$(Board(RankNo, FileNo), 1, 1) = "B" Then
FEN = FEN & LCase(Mid$(Board(RankNo, FileNo), 2,
1))
Else
FEN = FEN & Mid$(Board(RankNo, FileNo), 2, 1)
End If
End If
Next
If NoOfSpaces > 0 Then
FEN = FEN & NoOfSpaces
End If
FEN = FEN & "/"
Next
FEN = FEN & WhoseTurn
GenerateFEN = FEN
End Function

9 37 ... 3
Call DisplayBoard(Board)
WriteLine (GenerateFEN(Board, WhoseTurn))
DisplayWhoseTurnItIs (WhoseTurn)
MoveIsLegal = False
...

23 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Java

Qu Part Marking Guidance Marks


4 20 static void main(string[] args) { 11
String prime;
int count1;
int count2;

console.println("The first few prime numbers are:");


for (count1 = 2; count1 <= 50; count1++) {
count2 = 2;
prime = "Yes";
while (count2 * count2 <= count1) {
if (count1 % count2 == 0) {
prime = "No";
}
count2 = count2 + 1;
}
if (prime.equals("Yes")) {
console.println(count1);
}
}
console.readln();
}

Alternative solution :

If not using AQAConsole2015 class replace :


console.println(. . .)
with
System.out.println(. . .)

6 29 do { 4
noOfMoves = 0;
whoseTurn = 'W';
...
do {
...
do {
...
}
gameOver = checkIfGameWillBeWon(board, finishRank,
finishFile);
makeMove(board, startRank, startFile, finishRank,
finishFile, whoseTurn);
noOfMoves = noOfMoves + 1;
console.println("The number of moves completed so far:
" + Float.tostring(noOfMoves));
if (gameOver) {
...

24 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

7 31 ... 4
char pieceType;
char pieceColour;
boolean moveIsLegal = true;
if ((finishFile == startFile) && (finishRank == startRank))
{
moveIsLegal = false;
}
if (finishFile > 8 || finishFile < 1 || finishRank > 8 ||
finishRank < 1) {
moveIsLegal = false;
}
pieceType = board[startRank][startFile].charAt(1);
...

8 33 ... 1
case 'S' :
case 'K' :
...

8 34 ... 5
if ((whoseTurn == 'W') && (finishRank == 1) &&
(board[startRank][startFile].charAt(1) == 'R')) {
board[finishRank][finishFile] = "WK";
board[startRank][startFile] = " ";
} else {
if (board[startRank][startFile].charAt(1) == 'K'
&& !board[finishRank][finishFile].equals(" ")) {
Board[finishRank][finishFile] =
Character.toString(board[startRank][startFile].charAt(0)) +
Character.toString(board[finishRank][finishFile].charAt(1))
;
} else {
if ((whoseTurn == 'B') && (finishRank == 8) &&
(board[startRank][startFile].charAt(1) == 'R')) {
board[finishRank][finishFile] = "BM";
board[startRank][startFile] = " ";
} else {
board[finishRank][finishFile] =
board[startRank][startFile];
board[StartRank][startFile] = " ";
}
}
}
...

Alternative Solution
...
if ((whoseTurn == 'W') && (finishRank == 1) &&

25 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

(board[startRank][startFile].charAt(1) == 'R')) {
board[finishRank][finishFile] = "WK";
board[startRank][startFile] = " ";
} else {
if (board[startRank][startFile].charAt(1) == 'K' &&
!board[finishRank][finishFile].equals(" ")) {
board[finishRank][finishFile] = "W" +
Character.toString(board[finishRank][finishFile].charAt(1))
;
} else {
if ((whoseTurn == 'B') && (finishRank == 8) &&
(board[startRank][startFile].charAt(1) == 'R')) {
board[finishRank][finishFile] = "BM";
board[startRank][startFile] = " ";
} else {
board[finishRank][finishFile] =
board[startRank][startFile];
board[startRank][startFile] = " ";
}
}
}
...

9 36 String generateFEN(String[][] board, char whoseTurn) { 13


String FEN;
int rankNo;
int fileNo;
int noOfSpaces;
FEN = "";
for (rankNo = 1; rankNo <= BOARD_DIMENSION; rankNo++) {
noOfSpaces = 0;
for (fileNo = 1; fileNo <= BOARD_DIMENSION; fileNo++) {
if (board[rankNo][fileNo].equals(" ")) {
noOfSpaces = noOfSpaces + 1;
} else {
if (noOfSpaces > 0) {
FEN = FEN + Integer.toString(noOfSpaces);
noOfSpaces = 0;
}
if (board[rankNo][fileNo].charAt(0) == 'B') {
FEN = FEN + Character.toString(board[rankNo][
fileNo].charAt(1)).toLowerCase();
} else {
FEN = FEN + board[rankNo][fileNo].charAt(1);
}
}
}
if (noOfSpaces > 0) {
FEN = FEN + Integer.toString(noOfSpaces);
}
FEN = FEN + "/";

26 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

}
FEN = FEN + Character.toString(whoseTurn);
return FEN;
}

9 37 ... 3
moveIsLegal = false;
displayBoard(board);
console.println(generateFEN(board, whoseTurn));
displayWhoseTurnItIs(whoseTurn);
...

27 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

C#

Qu Part Marking Guidance Marks


4 20 static void Main(string[] args) { 11
string Prime;
int Count1;
int Count2;
Console.WriteLine("The first few prime numbers are:");
for (Count1 = 2; Count1 <= 50; Count1++) {
Count2 = 2;
Prime = "Yes";
while (Count2 * Count2 <= Count1) {
if (Count1 % Count2 == 0) {
Prime = "No";
}
Count2 = Count2 + 1;
}
if (Prime == "Yes") {
Console.WriteLine(Count1);
}
}
Console.ReadLine();
}

6 29 do 4
{
NoOfMoves = 0;
WhoseTurn = 'W';
...
do
...
do
{
...
} while (!MoveIsLegal)
GameOver = CheckIfGameWillBeWon(ref Board, FinishRank,
FinishFile);
MakeMove(ref Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn);
NoOfMoves = NoOfMoves + 1;
Console.WriteLine("The number of moves completed so
far: " + NoOfMoves.ToString("f1"));
if (GameOver)
...

7 31 ... 4
char PieceType;
char PieceColour;
Boolean MoveIsLegal = true;
if ((FinishFile == StartFile) && (FinishRank == StartRank))

28 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

MoveIsLegal = false;
if (FinishFile > 8 || FinishFile < 1 || FinishRank > 8 ||
FinishRank < 1)
MoveIsLegal = false;
PieceType = Board[StartRank, StartFile][1];
...

8 33 ... 1
case 'S' :
case 'K' :
...

8 34 ... 5
if ((WhoseTurn == 'W') && (FinishRank == 1) &&
(Board[StartRank, StartFile][1] == 'R'))
{
Board[FinishRank, FinishFile] = "WK";
Board[StartRank, StartFile] = " ";
}
else
if (Board[StartRank, StartFile][1] == 'K' &&
Board[FinishRank, FinishFile] != " ")
Board[FinishRank, Finishfile] = Board[StartRank,
StartFile][0].ToString + Board[FinishRank,
Finishfile][1].ToString();
else
if ((WhoseTurn == 'B') && (FinishRank == 8) &&
(Board[StartRank, StartFile][1] == 'R'))
{
Board[FinishRank, FinishFile] = "BM";
Board[StartRank, StartFile] = " ";
}
else
{
Board[FinishRank, FinishFile] = Board[StartRank,
StartFile];
Board[StartRank, StartFile] = " ";
}
...

Alternative Solution
...
if ((WhoseTurn == 'W') && (FinishRank == 1) && (Board[
StartRank, StartFile][1] == 'R'))
{
Board[FinishRank, FinishFile] = "WK";
Board[StartRank, StartFile] = " ";
}
else
if (Board[StartRank, StartFile][1] == 'K' &&

29 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Board[FinishRank, finishFile] != " ")


Board[FinishRank, FinishFile] = "W" + Board[finishRank,
FinishFile][1].ToString();
else
if ((WhoseTurn == 'B') && (FinishRank == 8) &&
(Board[StartRank, StartFile][1] == 'R'))
{
Board[FinishRank, FinishFile] = "BM";
Board[StartRank, StartFile] = " ";
}
else
{
Board[FinishRank, FinishFile] = Board[StartRank,
StartFile];
Board[StartRank, StartFile] = " ";
}
...

9 36 public static string GenerateFEN(string[,] Board, char 13


WhoseTurn)
{
string FEN;
int RankNo;
int FileNo;
int NoOfSpaces;
FEN = "";
for (RankNo = 1; RankNo <= BoardDimension; RankNo++)
{
NoOfSpaces = 0;
for (FileNo = 1; FileNo <= BoardDimension; FileNo++)
if (Board[RankNo, FileNo] == " ")
NoOfSpaces = NoOfSpaces + 1;
else
if (NoOfSpaces > 0)
{
FEN = FEN + NoOfSpaces.ToString();
NoOfSpaces = 0;
}
if (Board[RankNo, FileNo][0] == 'B')
FEN = FEN + Board[RankNo,
FileNo][1].ToString().ToLower();
else
FEN = FEN + Board[RankNo, FileNo][1];
if (NoOfSpaces > 0)
FEN = FEN + NoOfSpaces.ToString();
FEN = FEN + "/";
}
FEN = FEN + WhoseTurn.ToString();
return FEN;
}

30 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

9 37 ... 3
MoveIsLegal = false;
DisplayBoard(ref Board);
Console.WriteLine(GenerateFEN(Board, WhoseTurn));
DisplayWhoseTurnItIs(WhoseTurn);
...

31 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Python 2

Qu Part Marking Guidance Marks


4 20 print "The first few prime numbers are:" 11
for Count1 in range(2,51):
Count2 = 2
Prime = "Yes"
while Count2 * Count2 <= Count1:
if Count1 % Count2 == 0:
Prime = "No"
Count2 = Count2 + 1
if Prime == "Yes":
print Count1

6 29 while PlayAgain == "Y": 4


NoOfMoves = 0
WhoseTurn = "W"
....
while not(GameOver):
....
while not(MoveIsLegal):
....
GameOver = CheckIfGameWillBeWon(Board, FinishRank,
FinishFile)
MakeMove(Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn)
NoOfMoves = NoOfMoves + 1
print "The number of moves completed so far:
",NoOfMoves
if GameOver:
DisplayWinner(WhoseTurn)
....

7 31 def CheckMoveIsLegal(Board, StartRank, StartFile, 4


FinishRank, FinishFile, WhoseTurn):
MoveIsLegal = True
if FinishFile > 8 or FinishFile < 1 or FinishRank > 8 or
FinishFile < 1:
MoveIsLegal = False
elif (FinishFile == StartFile) and (FinishRank ==
StartRank):
MoveIsLegal = False
...

8 33 if MoveIsLegal == True: 1
if PieceType == "R":
MoveIsLegal = CheckRedumMoveIsLegal(Board, StartRank,
StartFile, FinishRank, FinishFile, PieceColour)
elif PieceType == "S" or PieceType == "K":
MoveIsLegal = CheckSarrumMoveIsLegal(Board, StartRank,

32 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

StartFile, FinishRank, FinishFile)


elif PieceType == "M":
...

8 34 if (WhoseTurn == "W") and (FinishRank == 1) and 5


(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "WK"
Board[StartRank][StartFile] = " "
elif Board[StartRank][StartFile][1] == "K" and
Board[FinishRank][FinishFile] != " ":
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile][0] +
Board[FinishRank][FinishFile][1]
elif (WhoseTurn == "B") and (FinishRank == 8) and
(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "BM"
Board[StartRank][StartFile] = " "
else:
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile]
Board[StartRank][StartFile] = " "
...

Alternative answer

if (WhoseTurn == "W") and (FinishRank == 1) and


(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "WK"
Board[StartRank][StartFile] = " "
elif Board[StartRank][StartFile][1] == "K" and
Board[FinishRank][FinishFile] != " ":
Board[FinishRank][FinishFile] = "W" +
Board[FinishRank][FinishFile][1]
elif (WhoseTurn == "B") and (FinishRank == 8) and
(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "BM"
Board[StartRank][StartFile] = " "
else:
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile]
Board[StartRank][StartFile] = " "
...

9 36 def GenerateFEN(Board, WhoseTurn): 13


FEN = ""
for RankNo in range(1 , BOARDDIMENSION + 1):
NoOfSpaces = 0
for FileNo in range(1 , BOARDDIMENSION + 1):
if Board[RankNo][FileNo] == " ":
NoOfSpaces = NoOfSpaces + 1

33 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

else:
if NoOfSpaces > 0:
FEN = FEN + str(NoOfSpaces)
NoOfSpaces = 0
if Board[RankNo][FileNo][0] == "B":
FEN = FEN + Board[RankNo][FileNo][1].lower()
else:
FEN = FEN + Board[RankNo][FileNo][1]
if NoOfSpaces > 0:
FEN = FEN + str(NoOfSpaces)
FEN = FEN + "/"
FEN = FEN + WhoseTurn
return FEN

9 37 while not(GameOver): 3
DisplayBoard(Board)
print GenerateFEN(Board, WhoseTurn)
DisplayWhoseTurnItIs(WhoseTurn)
MoveIsLegal = False
while not(MoveIsLegal):
...

34 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

Python 3

Qu Part Marking Guidance Marks


4 20 print ("The first few prime numbers are:") 11
for Count1 in range(2,51):
Count2 = 2
Prime = "Yes"
while Count2 * Count2 <= Count1:
if Count1 % Count2 == 0:
Prime = "No"
Count2 = Count2 + 1
if Prime == "Yes":
print (Count1)

6 29 while PlayAgain == "Y": 4


NoOfMoves = 0
WhoseTurn = "W"
...
while not(GameOver):
...
while not(MoveIsLegal):
...
GameOver = CheckIfGameWillBeWon(Board, FinishRank,
FinishFile)
MakeMove(Board, StartRank, StartFile, FinishRank,
FinishFile, WhoseTurn)
NoOfMoves = NoOfMoves + 1
print ("The number of moves completed so far:
"+str(NoOfMoves))
if GameOver:
DisplayWinner(WhoseTurn)
...

7 31 def CheckMoveIsLegal(Board, StartRank, StartFile, 4


FinishRank, FinishFile, WhoseTurn):
MoveIsLegal = True
if FinishFile > 8 or FinishFile < 1 or FinishRank > 8 or
FinishFile < 1:
MoveIsLegal = False
elif (FinishFile == StartFile) and (FinishRank ==
StartRank):
MoveIsLegal = False
...

8 33 if MoveIsLegal == True: 1
if PieceType == "R":
MoveIsLegal = CheckRedumMoveIsLegal(Board, StartRank,
StartFile, FinishRank, FinishFile, PieceColour)
elif PieceType == "S" or PieceType == "K":
MoveIsLegal = CheckSarrumMoveIsLegal(Board,

35 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

StartRank, StartFile, FinishRank, FinishFile)


elif PieceType == "M":
...

8 34 if (WhoseTurn == "W") and (FinishRank == 1) and 5


(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "WK"
Board[StartRank][StartFile] = " "
elif Board[StartRank][StartFile][1] == "K" and
Board[FinishRank][FinishFile] != " ":
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile][0] +
Board[FinishRank][FinishFile][1]
elif (WhoseTurn == "B") and (FinishRank == 8) and
(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "BM"
Board[StartRank][StartFile] = " "
else:
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile]
Board[StartRank][StartFile] = " "
...

Alternative answer

if (WhoseTurn == "W") and (FinishRank == 1) and


(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "WK"
Board[StartRank][StartFile] = " "
elif Board[StartRank][StartFile][1] == "K" and
Board[FinishRank][FinishFile] != " ":
Board[FinishRank][FinishFile] = "W" +
Board[FinishRank][FinishFile][1]
elif (WhoseTurn == "B") and (FinishRank == 8) and
(Board[StartRank][StartFile][1] == "R"):
Board[FinishRank][FinishFile] = "BM"
Board[StartRank][StartFile] = " "
else:
Board[FinishRank][FinishFile] =
Board[StartRank][StartFile]
Board[StartRank][StartFile] = " "
...

9 36 def GenerateFEN(Board, WhoseTurn): 13


FEN = ""
for RankNo in range(1 , BOARDDIMENSION + 1):
NoOfSpaces = 0
for FileNo in range(1 , BOARDDIMENSION + 1):
if Board[RankNo][FileNo] == " ":
NoOfSpaces = NoOfSpaces + 1
else:

36 of 37
MARK SCHEME – AS LEVEL COMPUTING – COMP1 – JUNE 2015

if NoOfSpaces > 0:
FEN = FEN + str(NoOfSpaces)
NoOfSpaces = 0
if Board[RankNo][FileNo][0] == "B":
FEN = FEN + Board[RankNo][FileNo][1].lower()
else:
FEN = FEN + Board[RankNo][FileNo][1]
if NoOfSpaces > 0:
FEN = FEN + str(NoOfSpaces)
FEN = FEN + "/"
FEN = FEN + WhoseTurn
return FEN

9 37 while not(GameOver): 3
DisplayBoard(Board)
print (GenerateFEN(Board, WhoseTurn))
DisplayWhoseTurnItIs(WhoseTurn)
MoveIsLegal = False
while not(MoveIsLegal):
...

37 of 37

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy