Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The link to the code is https://pastebin.com/0zJYcaKV all i need is to add an ending saying the score and if you won or lost and

The link to the code is https://pastebin.com/0zJYcaKV all i need is to add an ending saying the score and if you won or lost and then close the turtle.

if the game is ended by the ball going off the bottom of the screen the function will need to write something like "You Lose" and then the score in the center of the screen

if the game is ended by the player destroying all the blocks the function will need to write something like "You Win!" and then the score.

The function will also need to set the global gamestart to false

It would look similar to this

def gameend(score,end):

writer = turtle.Turtle()

writer.hideturtle()

writer.setpos([wherever you want to write])

global gamestart = false

if end == "blocks"

writer.write("You lose! score:"+score)

if end == "offscreen":

writer.write("You win! score:"+score)

I already have the code for the game I just need the ending to show if you won or lost and for it to end all in python turtle.

If you have any other questions I will help. Just am confused about how to make the end of the game to show if I lost or won! need to create it in python and also have it as two parameters for the score to show and also how the game will end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Unity From Zero To Proficiency Beginner A Step By Step Guide To Coding Your First Game

Authors: Patrick Felicia

1st Edition

1091872023, 978-1091872028

More Books

Students also viewed these Programming questions