Want to create interactive content? It’s easy in Genially!

Get started free

swe PROJECT

Nidia Fino

Created on June 2, 2023

Start designing with a free template

Discover more than 1500 professional designs like these:

Christmas Spirit Test

Corporate Icebreaker

Retro Bits Quiz

Sailboat quiz

Sailboat Quiz Mobile

Bomb Quiz

Witchcraft Quiz

Transcript

<

>

<Introduction to Software Engineering>

Bob Ndertusat

SNAKE GAME

start>

<

>

<Insight about our team>

Bob Ndertusat: Klaudia Tamburi Nidia Fino Sara Onjea Juna Dako
let's get into it>
We are named "Bob Ndertusat"!To solve problems and get things done with a positive attitude, Bob the Builder and pals dig, haul and build together and just like the famous cartoon that is our group's manifesto: we build code together with a positive attitude towards problem solving.

>

>

Topic of choice: Snake Game

We picked this topic for our project because we found it best fit us. All of the members of this team are gamers and enjoy playing various games, futhermore we were all familiar with snake game. Making coding fun, and programming things we enjoy is our objective.

Project Managment

Respecting deadlines

Constant updates and communication

Tools we used

Delegating tasks

Our online workspace, The tool we used for Project Managment
Trello
question 1

Did you know that Snake Game is on over 400 million mobile phones and is now in its ninth version?

That doesn't sound right!

Yes I'm aware of it's popularity.

INdeed! Snake game is a very popular game and we all played it as children! This fact was our inspiration behind it
To programm our favorite game we picked two popular programming languages, and got to coding.

Python

Menu

kLAUDIA

NIDIA

SARA

JUNA

Project Implementation

To code the program we used:

Run it

<

>

Testing the code

Debug & Run the draft code

Make notes on the errors & discuss on fixing them

Write the wrong answer here

Test it again

Run it

Bob Ndertusat Repository

Bob Ndertusat Repository

Klauda's part of the Collab

Nidia's part of the Collab

Sara's part of the Collab

Juna's part of the Collab

Klaudia

#function determining how the snake head movesdef move(): if head.direction=="up": head.sety(head.ycor()+20) if head.direction=="down": head.sety(head.ycor()-20) if head.direction=="left": head.setx(head.xcor()-20) if head.direction=="right": head.setx(head.xcor()+20)

#window setup wn=turtle.Screen() wn.setup(width=700,height=650) root = wn.getcanvas().winfo_toplevel() root.resizable(False, False) wn.title("Snake Game by Bob Ndertusat") wn.bgcolor('#60D164') wn.tracer(0) #snake head setup head=turtle.Turtle() head.speed(0) head.color('#030721') head.shape("circle") head.shapesize(1.1) head.penup() head.goto(0,0) head.direction="stop"

#functions to update the movement of the snakegame=Truedef go_up(): global game if head.direction !="down" and game!=False: head.direction="up"def go_down(): global game if head.direction !="up" and game!=False: head.direction="down"def go_right(): global game if head.direction !="left" and game!=False: head.direction="right"def go_left(): global game if head.direction !="right" and game!=False: head.direction="left"

JUna

#function to update the movement of body def bodymove(): if head.direction=="left" or head.direction=="right" or head.direction=="up" or head.direction=="down": for index in range(len(body)-1,-1,-1): x=body[index-1].xcor() y=body[index-1].ycor() body[index].goto(x,y) if index==0: x=head.xcor() y=head.ycor() body[0].goto(x,y)

#snake initial body setup body = [] for index in range(1,4,+1): body_part=turtle.Turtle() body_part.speed(0) body_part.shape("circle") body_part.color('#383fff') body_part.penup() body_part.goto(head.xcor()-(20*index),0) body.append(body_part)

#function to grow snake each time it feeds def newbody(): new_body_part=turtle.Turtle() new_body_part.speed(0) new_body_part.shape("circle") new_body_part.color('#383fff') new_body_part.penup() body.append(new_body_part)

Nidia

#defining function for border collision def border_collision(): if head.xcor()>330 or head.xcor()<-330 or head.ycor()>305 or head.ycor()<-305: global game game=False head.direction="stop" pen.penup() pen.goto(0,0) pen.write("GAME OVER! Press 'R' to restart.", align="center", font=("Courier",12,"normal"))

#function to speed up the snake n=0.14 def speed(): global n global score if ((score%5)==0 and n>0.05): n-=0.01 #def function to update score def update_score(): global score global high_score score+=1 if score>high_score: high_score=score pen.clear() pen.write("Score: {} High Score: {}".format(score,high_score),align="center", font=("Courier",12,"normal")) speed()

#Pen and scores score=0 high_score=0 pen=turtle.Turtle() pen.shape=("square") pen.penup() pen.hideturtle() pen.goto(0,305) pen.write("Score: {} High Score: {}".format(score,high_score),align="center", font=("Courier",12,"normal"))

Sara

#define function for body collision def body_collision(): for segment in body: if head.distance(segment)<20: global game game=False head.direction="stop" pen.penup() pen.goto(0,0) pen.write("GAME OVER! Press 'R' to restart.", align="center", font=("Courier",12,"normal"))

#defining function for food collision def food_collision(): if head.distance(apple)<18: x=random.randint(-335,335) y=random.randint(-310,310) apple.goto(x,y) newbody() update_score()

#snake food apple=turtle.Turtle() apple.speed(0) apple.color("red") apple.shape("triangle") apple.shapesize(0.8) apple.penup() apple.goto(80,0)

Domain Models

PROJECT REQUIRMENTS

01

Functional

02

User Interface

03

Usability

04

Performance

05

Manageability

It wasn't all a smooth sailing! Of course we were faced with some challenges!

Team Dynamics

Object oriented programming

Technical limitations

Things that could be implemented in the future!

Pause function

Sound effects

Multiplayer

before you go...one more question...

how to play snake game

Project completed!

<Thank you for your attention>

return 0;

>

<