Skip to content

Commit 6488048

Browse files
committed
got gradle projects set up/Second-nital commit
1 parent 1108b4e commit 6488048

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1021
-4818
lines changed

.classpath

-32
This file was deleted.

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33

44
# Ignore Gradle build output directory
55
build
6-
7-
# Ignore Note
8-
9-
notes.json

.project

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>ICS201</name>
4-
<comment>Project ICS201 created by Buildship.</comment>
3+
<name>ICS3U1</name>
4+
<comment>Project ICS3U1 created by Buildship.</comment>
55
<projects>
66
</projects>
77
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
138
<buildCommand>
149
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
1510
<arguments>
1611
</arguments>
1712
</buildCommand>
1813
</buildSpec>
1914
<natures>
20-
<nature>org.eclipse.jdt.core.javanature</nature>
2115
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
2216
</natures>
2317
</projectDescription>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
connection.project.dir=
1+
connection.project.dir=Actual Game
22
eclipse.preferences.version=1

.vscode/settings.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
{
2-
"files.exclude": {
3-
"**/.classpath": true,
4-
"**/.project": true,
5-
"**/.settings": true,
6-
"**/.factorypath": true
7-
},
8-
"java.configuration.updateBuildConfiguration": "automatic"
2+
"java.configuration.updateBuildConfiguration": "interactive"
93
}

.vscode/tasks.json

-19
This file was deleted.

Actual Game/.classpath

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="bin/main" path="src/main/java">
4+
<attributes>
5+
<attribute name="gradle_scope" value="main"/>
6+
<attribute name="gradle_used_by_scope" value="main,test"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/"/>
10+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
11+
<classpathentry kind="output" path="bin/default"/>
12+
</classpath>

Actual Game/.project

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Actual Game</name>
4+
<comment>Project Actual Game created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=
2+
eclipse.preferences.version=1

Actual Game/bin/main/game/App.class

652 Bytes
Binary file not shown.
600 Bytes
Binary file not shown.
201 Bytes
Binary file not shown.
1.37 KB
Binary file not shown.
995 Bytes
Binary file not shown.
746 Bytes
Binary file not shown.
872 Bytes
Binary file not shown.
Binary file not shown.
1.56 KB
Binary file not shown.
1.12 KB
Binary file not shown.
354 Bytes
Binary file not shown.
1004 Bytes
Binary file not shown.

Actual Game/build.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
plugins {
2+
id 'java'
3+
id 'application'
4+
}
5+
6+
mainClassName = "game.App"
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* This Java source file was generated by the Gradle 'init' task.
3+
*/
4+
package game;
5+
6+
import game.drawing.*;
7+
import game.Screen;
8+
9+
10+
11+
12+
public class App{
13+
14+
public static void main(String[] args) {
15+
createAndShowGUI();
16+
17+
}
18+
19+
20+
21+
private static void createAndShowGUI() {
22+
Screen screen = new Screen();
23+
screen.addTo(new GamePanel());
24+
screen.buildScreen(500, 500);
25+
26+
27+
}
28+
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package game;
2+
3+
import java.awt.*;
4+
import javax.swing.JFrame;
5+
import javax.swing.JPanel;
6+
7+
public class GameActions extends JPanel{
8+
9+
public static GameActions Game_Instance = null;
10+
11+
public GameActions getInstance(){
12+
13+
if(Game_Instance == null){
14+
Game_Instance = new GameActions();
15+
16+
return Game_Instance;
17+
}
18+
19+
return Game_Instance;
20+
}
21+
22+
public void loop(){
23+
while(true){
24+
25+
26+
27+
28+
29+
30+
}
31+
32+
33+
}
34+
35+
36+
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package game;
2+
3+
import game.utils.Position;
4+
5+
6+
7+
public interface GameInterface{
8+
9+
public void refresh();
10+
11+
public void listeners();
12+
13+
public Position position();
14+
15+
16+
17+
}
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package game;
2+
3+
import java.awt.Component;
4+
import java.util.List;
5+
6+
import javax.swing.*;
7+
8+
public class Screen {
9+
10+
private static JFrame screen;
11+
12+
13+
public Screen() {
14+
this("Default");
15+
}
16+
17+
public Screen(final String name) {
18+
createScreen(name);
19+
}
20+
21+
public JFrame createScreen(final String name) {
22+
screen = new JFrame(name);
23+
return screen;
24+
}
25+
26+
public JFrame getJFrame(){
27+
return screen;
28+
}
29+
30+
31+
public void addTo(final Component addToItem) {
32+
screen.getContentPane().add(addToItem);
33+
34+
}
35+
36+
public void buildScreen(int x, int y) {
37+
screen.pack();
38+
screen.setSize(x, y);
39+
screen.setLayout(null);
40+
screen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
41+
screen.setFocusable(true);
42+
screen.setVisible(true);
43+
}
44+
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package game.constants;
2+
3+
4+
public class Keys{
5+
6+
public static final int a = 65;
7+
public static final int b = 66;
8+
public static final int c = 67;
9+
public static final int d = 68;
10+
public static final int e = 69;
11+
public static final int f = 70;
12+
public static final int g = 71;
13+
public static final int h = 72;
14+
public static final int i = 73;
15+
public static final int j = 74;
16+
public static final int k = 75;
17+
public static final int l = 76;
18+
public static final int m = 77;
19+
public static final int n = 78;
20+
public static final int o = 79;
21+
public static final int p = 80;
22+
public static final int q = 81;
23+
public static final int r = 82;
24+
public static final int s = 83;
25+
public static final int t = 84;
26+
public static final int u = 85;
27+
public static final int v = 86;
28+
public static final int w = 87;
29+
public static final int x = 88;
30+
public static final int y = 89;
31+
public static final int z = 90;
32+
public static final int shift = 16;
33+
public static final int space = 32;
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package game.controls;
2+
3+
4+
import java.awt.event.*;
5+
import game.constants.Keys;;
6+
7+
8+
public class Input implements KeyListener{
9+
10+
@Override
11+
public void keyTyped(KeyEvent e) {
12+
// TODO Auto-generated method stub
13+
14+
}
15+
16+
@Override
17+
public void keyPressed(KeyEvent e) {
18+
System.out.println(e);
19+
20+
}
21+
22+
@Override
23+
public void keyReleased(KeyEvent e) {
24+
// TODO Auto-generated method stub
25+
26+
}
27+
28+
29+
30+
31+
}

0 commit comments

Comments
 (0)