Scroll to see replies
def CheckIfMoveIsValid(Board, Move, P1, P2, HumanPlayersTurn):
Row = Move % 10
Column = Move // 10
MoveIsValid = False
if Board[Row][Column] == " ":
if HumanPlayersTurn:
Board[Row][Column] = P1
else:
Board[Row][Column] = P2
Valid1 = CheckIfThereArePiecesToFlip(Board, BoardSize, Row, Column, 1, 0)
Valid2 = CheckIfThereArePiecesToFlip(Board, BoardSize, Row, Column, -1, 0)
Valid3 = CheckIfThereArePiecesToFlip(Board, BoardSize, Row, Column, 0, 1)
Valid4 = CheckIfThereArePiecesToFlip(Board, BoardSize, Row, Column, 0, -1)
if Valid1 == True or Valid2 == True or Valid3 == True or Valid4 == True:
MoveIsValid = True
else:
Board[Row][Column] = " "
return MoveIsValid
Last reply 1 minute ago
SQA Higher Physics - Paper 2 - 25th April 2024 [Exam Chat]Posted 4 minutes ago
Worried about the acceptance of my A level Qualifications. Need an answerLast reply 4 minutes ago
Official Dental Hygiene and Therapy (Oral Health Science) 2024 Entry Thread2928
Last reply 6 minutes ago
Apprenticeship needs a 4 in scienceLast reply 11 minutes ago
How to go from an A grade essay to an A* essay in edexcel politics?Posted 14 minutes ago
Thinking of quitting my apprenticeshipLast reply 14 minutes ago
University of Oxford 2025 Undergraduate Applicants Official ThreadLast reply 18 minutes ago
LSE International Social and Public Policy and Economics (LLK1) 2024 ThreadLast reply 19 minutes ago
Official Cambridge Postgraduate Applicants 2024 ThreadLast reply 25 minutes ago
Official UCL Offer Holders Thread for 2024 entryLast reply 8 hours ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 1 day ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 4 weeks ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]Last reply 8 hours ago
Is MathsFM French Alevels good for a CS degree at top uni (OX, UCL, Durham etc)Last reply 1 day ago
OCR A-level Computer Science Paper 1 (H446/01) - 12th June 2023 [Exam Chat]Last reply 1 week ago
OCR A-level Computer Science Paper 2 (H446/02) - 19th June 2023 [Exam Chat]Last reply 3 weeks ago
AQA A-level Computer Science Paper 1 (7517 1A - 1E) - 12th June 2023 [Exam Chat]Last reply 4 weeks ago
Not receiving any response from University of Birmingham.Last reply 3 months ago
OCR GCSE Computer Science Paper 1 (J277/01) - 19th May 2023 [Exam Chat]Last reply 3 months ago
AQA GCSE Computer Science Paper 2 (8525/2) - 25th May 2023 [Exam Chat]