The Student Room Group

AQA Computer Science A-Level Skeleton Code

Does anyone know what SymbolsNotAllowed does? what is the purpose of this list?
SymbolsNotAllowed is essentially a string list of symbols that aren't allowed to be placed by the user, depending on where in the grid they're trying it. it's intended to prevent users duplicating patterns in the gaps between the letters.

let's say you've entered a Q pattern somewhere on the grid. there would be a few spaces where you *could* place a letter, right?
Well, since the CheckForMatchWithPattern function has used AddToNotAllowedSymbols, the entire 3x3 area of the pattern is now inaccessible to the user.

Tried to draw a diagram, hope this explains it a bit better
Reply 2
Original post by StargazingFloof
SymbolsNotAllowed is essentially a string list of symbols that aren't allowed to be placed by the user, depending on where in the grid they're trying it. it's intended to prevent users duplicating patterns in the gaps between the letters.
let's say you've entered a Q pattern somewhere on the grid. there would be a few spaces where you *could* place a letter, right?
Well, since the CheckForMatchWithPattern function has used AddToNotAllowedSymbols, the entire 3x3 area of the pattern is now inaccessible to the user.
Tried to draw a diagram, hope this explains it a bit better

ty, your explanation was great
Reply 3
Original post by StargazingFloof
SymbolsNotAllowed is essentially a string list of symbols that aren't allowed to be placed by the user, depending on where in the grid they're trying it. it's intended to prevent users duplicating patterns in the gaps between the letters.
let's say you've entered a Q pattern somewhere on the grid. there would be a few spaces where you *could* place a letter, right?
Well, since the CheckForMatchWithPattern function has used AddToNotAllowedSymbols, the entire 3x3 area of the pattern is now inaccessible to the user.
Tried to draw a diagram, hope this explains it a bit better

i was looking over this and tried inputting the combinations of Q's and T's as you have in your diagram, but i noticed that the pattern does work and the user is given 20 points:
Reply 4
When you make a Q pattern, the 9 cells in that Q added to SymbolsNotAllowed so you cant add a Q in those usually 4 unused cells to make another Q pattern closeby. This isn't fool proof of course, the code only restricts adding Qs AFTER a correct pattern is found, you can place all the Qs before that, the matching method still checks for the Qs.
Reply 5
Original post by StargazingFloof
SymbolsNotAllowed is essentially a string list of symbols that aren't allowed to be placed by the user, depending on where in the grid they're trying it. it's intended to prevent users duplicating patterns in the gaps between the letters.
let's say you've entered a Q pattern somewhere on the grid. there would be a few spaces where you *could* place a letter, right?
Well, since the CheckForMatchWithPattern function has used AddToNotAllowedSymbols, the entire 3x3 area of the pattern is now inaccessible to the user.
Tried to draw a diagram, hope this explains it a bit better

My understanding is that when you made a Q pattern, the remaining cells of that 3x3 can't be used to place new Q symbols as that can lead to making another Q pattern without using 5 new symbox, perhaps only 3 and then even less, Fill the whole grid with Qs and you'd end up with a lot of points.
Reply 6
the way it truly works:

SymbolsNotAllowed is used so the user can't just create a pattern, change one of the Q's (of the 3x3) to a T and then change that T back to a Q.
Got 75 % on my coursework
I am really bad at programming
Would it be possible to get a B if I clutch up on the theory paper
Reply 8
Original post by musaiqbal427
Got 75 % on my coursework
I am really bad at programming
Would it be possible to get a B if I clutch up on the theory paper
i think so but i would recommend learning some parts of the code, and parts for section A
Original post by A172891
i think so but i would recommend learning some parts of the code, and parts for section A


Thanks gives me hope🤞
Reply 10
Original post by A172891
i was looking over this and tried inputting the combinations of Q's and T's as you have in your diagram, but i noticed that the pattern does work and the user is given 20 points:

Am predicting that a question about this error will come up 100%
Reply 11
Original post by wreiyuguwr
Am predicting that a question about this error will come up 100%

is this an error though? i could be wrong, ive not read the actual preliminary in a while
Reply 12
Original post by A172891
is this an error though? i could be wrong, ive not read the actual preliminary in a while

mb i was wrong.
cannot place T but X or Q is allowed

Quick Reply