How to test the high-score in my Python-game

Joined
Jan 5, 2023
Messages
1
Reaction score
0
This is my first coding project, where I am doing a 6 x 6-matrix matching game ("Memory"). Now I have tried applying a high-score in the end of my game. The problem is, to be able to try if my high-score works I need to complete the whole game which takes long time.

How do I come around this problem? I'm happy to share my whole code to get feedback.

Thanks in advance!
 
Joined
May 11, 2022
Messages
61
Reaction score
6
i can't think of a work around since score is determined by total matches in total guesses.
 
Joined
Jan 8, 2023
Messages
27
Reaction score
2
Create a separate function for your high score feature that you can call independently from the rest of your game code. This will allow you to test the high score feature without having to play through the game.

Use test data to simulate game play and see how the high score feature behaves. For example, you could create an array of test scores and pass it to your high score function to see how it handles different inputs.

Use a debugging tool such as a print statement to track the value of your high score variable as it changes throughout the game. This can help you identify any issues with the high score feature and determine what changes are needed to get it working properly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top