Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Programming_Project_Group_14
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
s2032074
Programming_Project_Group_14
Commits
0fd48be5
"src/dotViewer.ts" did not exist on "911d68fb8e9b46affe0bacf8ebcf69f1ebf93220"
Commit
0fd48be5
authored
4 years ago
by
s2032074
Browse files
Options
Downloads
Patches
Plain Diff
id field is added to the block
parent
34828cec
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
Block.py
+4
-2
4 additions, 2 deletions
Block.py
with
4 additions
and
2 deletions
Block.py
+
4
−
2
View file @
0fd48be5
...
...
@@ -10,11 +10,13 @@ class Block:
#x and y -- coordinates of the top left corner
#length -- the length of one side of the square
#pressed -- is the boolean variable for detecting whether a user clicked on the block
def
__init__
(
self
,
x
,
y
,
length
,
pressed
):
#ID -- the id of the block
def
__init__
(
self
,
x
,
y
,
length
,
pressed
,
ID
):
self
.
x_coord
=
x
self
.
y_coord
=
y
self
.
length
=
length
self
.
pressed
=
pressed
self
.
ID
=
ID
def
draw_block
(
self
,
screen
):
'''
function for drawing a block with initialized parameters
'''
...
...
@@ -52,7 +54,7 @@ def main():
#creating an object
pressed
=
False
block1
=
Block
(
100
,
100
,
50
,
pressed
)
block1
=
Block
(
100
,
100
,
50
,
pressed
,
1
)
#drawing initial block
#block1.draw_block(screen)
...
...
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