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
230e2705
Commit
230e2705
authored
Jul 30, 2020
by
nargessalehi98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add update main.
parent
ceb1f536
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
Main.java
src/Main.java
+35
-1
No files found.
src/Main.java
View file @
230e2705
import
javax.swing.*
;
import
java.awt.*
;
import
java.io.IOException
;
public
class
Main
{
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
new
LoginFrame
();
//
new LoginFrame();
//new MainFrame();
//new MainFrame();
//new SettingFrame();
//new SettingFrame();
//new OnlineModeFrame();
//new OnlineModeFrame();
...
@@ -10,5 +14,35 @@ public class Main {
...
@@ -10,5 +14,35 @@ public class Main {
// jFrame.setBounds(500,500,700,400);
// jFrame.setBounds(500,500,700,400);
// jFrame.add(new Map());
// jFrame.add(new Map());
// jFrame.setVisible(true);
// jFrame.setVisible(true);
// Initialize the global thread-pool
ThreadPool
.
init
();
// Show the game menu ...
// After the player clicks 'PLAY' ...
EventQueue
.
invokeLater
(
new
Runnable
()
{
@Override
public
void
run
()
{
GameFrame
frame
=
null
;
try
{
frame
=
new
GameFrame
(
"JTankTrouble"
);
}
catch
(
AWTException
|
IOException
e
)
{
e
.
printStackTrace
();
}
}
frame
.
setLocationRelativeTo
(
null
);
// put frame at center of screen
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
frame
.
setVisible
(
true
);
frame
.
initBufferStrategy
();
// Create and execute the game-loop
GameLoop
game
=
new
GameLoop
(
frame
);
game
.
init
();
ThreadPool
.
execute
(
game
);
// and the game starts ...
}
});
}
}
}
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