Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
JTankTrouble
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9831111
JTankTrouble
Commits
6c645224
Commit
6c645224
authored
4 years ago
by
nargessalehi98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add javaDoc.
parent
feec7af9
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
Wall.java
src/Wall.java
+29
-1
No files found.
src/Wall.java
View file @
6c645224
import
java.awt.*
;
import
java.awt.*
;
/**
* this class keeps wall info
* @author narges salehi & sepehr tavakoli
* @version 1.1
* @since July 21 2020
*/
public
class
Wall
{
public
class
Wall
{
//coordinate of wall
private
int
x
,
y
,
width
,
height
;
private
int
x
,
y
,
width
,
height
;
//Graphic2D to draw wall
private
Graphics2D
g2d
;
private
Graphics2D
g2d
;
/**
* constructor of each wall
* @param x of wall
* @param y of wall
* @param width of wall
* @param height of wall
* @param g2d to draw wall
*/
public
Wall
(
int
x
,
int
y
,
int
width
,
int
height
,
Graphics2D
g2d
)
{
public
Wall
(
int
x
,
int
y
,
int
width
,
int
height
,
Graphics2D
g2d
)
{
//set value given to constructor
this
.
x
=
x
;
this
.
x
=
x
;
this
.
y
=
y
;
this
.
y
=
y
;
this
.
height
=
height
;
this
.
height
=
height
;
...
@@ -16,18 +32,30 @@ public class Wall {
...
@@ -16,18 +32,30 @@ public class Wall {
g2d
.
fillRect
(
x
,
y
,
width
,
height
);
g2d
.
fillRect
(
x
,
y
,
width
,
height
);
}
}
/**
* @return x of wall
*/
public
int
getX
()
{
public
int
getX
()
{
return
x
;
return
x
;
}
}
/**
* @return y of wall
*/
public
int
getY
()
{
public
int
getY
()
{
return
y
;
return
y
;
}
}
/**
* @return width of wall
*/
public
int
getWidth
()
{
public
int
getWidth
()
{
return
width
;
return
width
;
}
}
/**
* @return Height of wall
*/
public
int
getHeight
()
{
public
int
getHeight
()
{
return
height
;
return
height
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment