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
d53304e0
Commit
d53304e0
authored
Aug 02, 2020
by
9831111
🙂
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add calculate bullet method to find first shot point.
parent
660d635a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
152 additions
and
84 deletions
+152
-84
GameFrame.java
src/GameFrame.java
+0
-14
GameState.java
src/GameState.java
+152
-70
No files found.
src/GameFrame.java
View file @
d53304e0
...
...
@@ -338,21 +338,7 @@ public class GameFrame extends JFrame {
}
}
public
boolean
checkWallAdded
(
int
currentX
,
int
currentY
)
{
String
str
=
currentX
+
" "
+
currentY
;
for
(
Wall
wall
:
walls
)
{
if
(
wall
.
toString
().
equals
(
str
))
return
false
;
else
return
true
;
}
return
true
;
}
public
void
getColor
(
int
x
,
int
y
)
throws
AWTException
{
Robot
robot
=
new
Robot
();
System
.
out
.
println
(
robot
.
getPixelColor
(
x
,
y
));
}
/**
* Draw prize randomly
...
...
src/GameState.java
View file @
d53304e0
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