Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
se3xa3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hameed Andy
se3xa3
Commits
f3830207
Commit
f3830207
authored
6 years ago
by
Hameed Andy
Browse files
Options
Downloads
Patches
Plain Diff
completed majority of theme modifications
parent
b4f1644c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BlankProjectTemplate/src/Gameplay.py
+1
-1
1 addition, 1 deletion
BlankProjectTemplate/src/Gameplay.py
BlankProjectTemplate/src/highscore.py
+8
-6
8 additions, 6 deletions
BlankProjectTemplate/src/highscore.py
with
9 additions
and
7 deletions
BlankProjectTemplate/src/Gameplay.py
+
1
−
1
View file @
f3830207
...
...
@@ -115,7 +115,7 @@ def game(speed, colour,food_colour, backgroundColour):
win
.
fill
(
backgroundColour
)
sc_color
=
[
0
,
0
,
0
]
if
backgroundColour
==
[
255
,
255
,
255
]
else
[
255
,
255
,
255
]
sc_color
=
[
0
,
0
,
0
]
if
backgroundColour
[
0
]
==
255
else
[
255
,
255
,
255
]
font
=
pygame
.
font
.
Font
(
"
Roboto-Light.ttf
"
,
30
)
text
=
font
.
render
(
"
"
+
str
(
score
),
True
,
sc_color
)
win
.
blit
(
text
,(
0
,
0
))
...
...
This diff is collapsed.
Click to expand it.
BlankProjectTemplate/src/highscore.py
+
8
−
6
View file @
f3830207
...
...
@@ -64,23 +64,25 @@ class HighScore():
def
main
():
pygame
.
init
()
red
=
[
255
,
0
,
0
]
white
=
(
255
,
255
,
255
)
black
=
(
48
,
47
,
47
)
while
True
:
mousepos
=
pygame
.
mouse
.
get_pos
()
#checking mouse position
mouseclick
=
pygame
.
mouse
.
get_pressed
()
#checking mouse pressed
highscore
=
pygame
.
display
.
set_mode
((
300
,
150
))
#
highscore.fill(
[213, 219, 219]
)
highscore
.
fill
(
white
)
pygame
.
display
.
set_caption
(
"
Highscore
"
)
HighScore
.
text
(
'
Highest Score:
'
+
str
(
HighScore
.
findHighScore
()),
"
comicsansms
"
,
30
,[
0
,
0
,
200
]
,(
10
,
20
),
highscore
)
HighScore
.
custom_
text
(
'
Highest Score:
'
+
str
(
HighScore
.
findHighScore
()),
"
Roboto-Light.ttf
"
,
30
,
black
,(
10
,
20
),
highscore
)
HighScore
.
button
(
highscore
,[
0
,
0
,
0
],
[
90
,
70
,
120
,
26
],
0
)
HighScore
.
text
(
'
Main Menu
'
,
"
times
"
,
25
,
red
,(
90
,
70
),
highscore
)
##
HighScore.button(highscore,[0,0,0], [90,70,120,26], 0)
HighScore
.
custom_
text
(
'
Main Menu
'
,
"
Roboto-Light.ttf
"
,
25
,
black
,(
90
,
70
),
highscore
)
if
(
90
<=
mousepos
[
0
]
<=
90
+
120
and
70
<=
mousepos
[
1
]
<=
70
+
27
):
if
mouseclick
[
0
]
==
1
:
Interface
.
main
()
HighScore
.
button
(
highscore
,[
0
,
0
,
0
],
[
125
,
105
,
45
,
27
],
0
)
HighScore
.
text
(
'
Quit
'
,
"
times
"
,
25
,
red
,(
125
,
105
),
highscore
)
##
HighScore.button(highscore,[0,0,0], [125,105,45,27], 0)
HighScore
.
custom_
text
(
'
Quit
'
,
"
Roboto-Light.ttf
"
,
25
,
black
,(
125
,
105
),
highscore
)
if
(
125
<=
mousepos
[
0
]
<=
125
+
45
and
105
<=
mousepos
[
1
]
<=
105
+
27
):
if
mouseclick
[
0
]
==
1
:
pygame
.
quit
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment