Grundstrukur
This commit is contained in:
parent
efe5eda0d6
commit
93e39b11e3
41
.idea/workspace.xml
generated
41
.idea/workspace.xml
generated
@ -4,7 +4,14 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="4d75e996-cee4-4ec6-b802-5b56d0c0eac4" name="Changes" comment="First Commit Test" />
|
<list default="true" id="4d75e996-cee4-4ec6-b802-5b56d0c0eac4" name="Changes" comment="Grundstrukur">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/GameLoop.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/GameLogic.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GameLogic.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/Player.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Player.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/Tracker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Tracker.java" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@ -31,6 +38,10 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
|
"Downloaded.Files.Path.Enabled": "false",
|
||||||
|
"Repository.Attach.Annotations": "false",
|
||||||
|
"Repository.Attach.JavaDocs": "false",
|
||||||
|
"Repository.Attach.Sources": "false",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"com.codeium.enabled": "true",
|
"com.codeium.enabled": "true",
|
||||||
"git-widget-placeholder": "master",
|
"git-widget-placeholder": "master",
|
||||||
@ -40,9 +51,9 @@
|
|||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"project.structure.last.edited": "Project",
|
"project.structure.last.edited": "Libraries",
|
||||||
"project.structure.proportion": "0.15",
|
"project.structure.proportion": "0.15",
|
||||||
"project.structure.side.proportion": "0.0",
|
"project.structure.side.proportion": "0.41724136",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}]]></component>
|
||||||
@ -62,7 +73,7 @@
|
|||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1732108904989</updated>
|
<updated>1732108904989</updated>
|
||||||
<workItem from="1732108906083" duration="758000" />
|
<workItem from="1732108906083" duration="3420000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="First Commit Test">
|
<task id="LOCAL-00001" summary="First Commit Test">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
@ -72,7 +83,23 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1732109548353</updated>
|
<updated>1732109548353</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="2" />
|
<task id="LOCAL-00002" summary="Second Commit Test">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1732109721570</created>
|
||||||
|
<option name="number" value="00002" />
|
||||||
|
<option name="presentableId" value="LOCAL-00002" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1732109721570</updated>
|
||||||
|
</task>
|
||||||
|
<task id="LOCAL-00003" summary="Grundstrukur">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1732109899753</created>
|
||||||
|
<option name="number" value="00003" />
|
||||||
|
<option name="presentableId" value="LOCAL-00003" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1732109899753</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="4" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@ -91,6 +118,8 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="First Commit Test" />
|
<MESSAGE value="First Commit Test" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="First Commit Test" />
|
<MESSAGE value="Second Commit Test" />
|
||||||
|
<MESSAGE value="Grundstrukur" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Grundstrukur" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
9
pom.xml
9
pom.xml
@ -14,13 +14,4 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>nu.pattern</groupId>
|
|
||||||
<artifactId>opencv</artifactId>
|
|
||||||
<version>2.4.9-4</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -1,2 +1,40 @@
|
|||||||
public class GameLogic {
|
pu
|
||||||
}
|
Player
|
||||||
|
objekte
|
||||||
|
private Player player1 = new Player(0, 0);
|
||||||
|
private Player player2 = new Player(0, 0);
|
||||||
|
|
||||||
|
setUp()
|
||||||
|
|
||||||
|
// Playerobjekte
|
||||||
|
private Player player1 = new Player(0, 0);
|
||||||
|
private Player player2 = new Player(0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
d set
|
||||||
|
{}()pU
|
||||||
|
iov etavirpleLogic gl = newmaG tatic void main(String[
|
||||||
|
{}sgra ])ic class GameLogic g
|
||||||
|
publ.run;
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private void run(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void trackPlayer1(){
|
||||||
|
|
||||||
|
}
|
||||||
|
private void drawGrafics(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void trackPlayer2(){
|
||||||
|
|
||||||
|
}
|
||||||
|
private void checkPlayerCollission(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
4
src/main/java/GameLoop.java
Normal file
4
src/main/java/GameLoop.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
public class GameLoop {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,2 +1,37 @@
|
|||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
public class Player {
|
public class Player {
|
||||||
|
// Attribute für die x- und y-Koordinaten
|
||||||
|
private int id;
|
||||||
|
private int trailLength = 30;
|
||||||
|
Queue<int[]> trail = new LinkedList<>();
|
||||||
|
|
||||||
|
// Konstruktor zur Initialisierung der Koordinaten
|
||||||
|
public Player(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//fügt 2 Koordinaten zum Trail hinzu und verhindert, dass dieser zulang wird
|
||||||
|
public void addToTrail(int x, int y){
|
||||||
|
this.trail.add(new int[]{x, y});
|
||||||
|
|
||||||
|
if(trail.size() > trailLength){
|
||||||
|
trail.poll();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Queue<int[]> getTrail(){
|
||||||
|
return trail;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//gibt aktuelle Position aus
|
||||||
|
public void printPosition() {
|
||||||
|
System.out.println("Player Position: (" + x + ", " + y + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +1,16 @@
|
|||||||
|
import org.opencv.core.Core;
|
||||||
|
import org.opencv.core.Mat;
|
||||||
|
import org.opencv.core.Point;
|
||||||
|
import org.opencv.core.Size;
|
||||||
|
import org.opencv.videoio.VideoCapture;
|
||||||
|
import org.opencv.highgui.HighGui;
|
||||||
|
import org.opencv.imgproc.Imgproc;
|
||||||
|
import org.opencv.imgproc.Moments;
|
||||||
|
import org.opencv.videoio.Videoio;
|
||||||
|
import processing.core.PApplet;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.Queue;
|
||||||
|
|
||||||
public class Tracker {
|
public class Tracker {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user