Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project Zavi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
mihkelhain
Project Zavi
Commits
e5919e36
Commit
e5919e36
authored
4 months ago
by
Jantz
Browse files
Options
Downloads
Patches
Plain Diff
little changes to man.py
parent
ec0f1aa9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+10
-11
10 additions, 11 deletions
main.py
with
10 additions
and
11 deletions
main.py
+
10
−
11
View file @
e5919e36
...
...
@@ -27,9 +27,6 @@ def main():
# GUI object creation
gui
=
GUI
()
# 32 pixels on 1920x1080 resolution
margin
=
world
.
window_resolution
[
0
]
/
60
dt
=
1
/
1000
time_now
=
time
.
time
()
#MOUSE TESTING
...
...
@@ -67,15 +64,15 @@ def main():
running
=
False
# Choose the tower to place with the number keys
if
event
.
key
==
pg
.
K_1
:
if
active_tower
!=
2
:
active_tower
=
2
if
world
.
active_tower
!=
2
:
world
.
active_tower
=
2
else
:
active_tower
=
0
world
.
active_tower
=
0
if
event
.
key
==
pg
.
K_2
:
if
active_tower
!=
2
:
active_tower
=
2
if
world
.
active_tower
!=
2
:
world
.
active_tower
=
2
else
:
active_tower
=
0
world
.
active_tower
=
0
# Start the round with the space key
if
event
.
key
==
pg
.
K_SPACE
and
not
world
.
round_active
:
world
.
request_to_start_round
=
True
...
...
@@ -114,8 +111,10 @@ def main():
# Debug drawing, comment out if not needed.
#world.draw_debug()
# Draw th round number
gui
.
draw_text
(
world
.
window
,
f
"
ROUND:
{
world
.
current_round
}
"
,
(
world
.
window_resolution
[
0
]
-
margin
,
margin
),
'
topright
'
)
# Draw the round number
gui
.
draw_text
(
world
.
window
,
f
"
ROUND:
{
world
.
current_round
}
"
,
(
world
.
window_resolution
[
0
]
-
gui
.
margin
,
gui
.
margin
),
'
topright
'
)
# Draw money balance
gui
.
draw_text
(
world
.
window
,
f
"
MONEY:
{
world
.
money
}
"
,
(
world
.
window_resolution
[
0
]
-
gui
.
margin
,
gui
.
margin
*
2
+
gui
.
font_size
),
'
topright
'
)
pg
.
display
.
update
()
...
...
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