Version 23.11 (Grafics update)
This commit is contained in:
parent
c6f1afc206
commit
bd78af3b48
44
.idea/workspace.xml
generated
44
.idea/workspace.xml
generated
@ -4,7 +4,10 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<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="Version 20.11">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/GraphicsProgram.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GraphicsProgram.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@ -20,9 +23,9 @@
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 8
|
||||
}]]></component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 8
|
||||
}</component>
|
||||
<component name="ProjectId" id="2p7Eq8ZJM8BEjLybOnAdhzZ82uv" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
@ -31,29 +34,28 @@
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Application.GraphicsProgram.executor": "Run",
|
||||
"Downloaded.Files.Path.Enabled": "false",
|
||||
"Repository.Attach.Annotations": "false",
|
||||
"Repository.Attach.JavaDocs": "false",
|
||||
"Repository.Attach.Sources": "false",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"com.codeium.enabled": "true",
|
||||
"git-widget-placeholder": "master",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/david/Documents/Uni/GTCar/processing-4.3/core/library/core.jar",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Project",
|
||||
"project.structure.last.edited": "Libraries",
|
||||
"project.structure.proportion": "0.15",
|
||||
"project.structure.side.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.24022989",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-jdk-9823dce3aa75-28b599e66164-intellij.indexing.shared.core-IU-242.23726.103" />
|
||||
<option value="bundled-js-predefined-d6986cc7102b-5c90d61e3bab-JavaScript-IU-242.23726.103" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
@ -63,6 +65,7 @@
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1732108904989</updated>
|
||||
<workItem from="1732108906083" duration="758000" />
|
||||
<workItem from="1732113837570" duration="5187000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="First Commit Test">
|
||||
<option name="closed" value="true" />
|
||||
@ -72,7 +75,15 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1732109548353</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<task id="LOCAL-00002" summary="Version 20.11">
|
||||
<option name="closed" value="true" />
|
||||
<created>1732118799936</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1732118799936</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@ -91,6 +102,7 @@
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="First Commit Test" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="First Commit Test" />
|
||||
<MESSAGE value="Version 20.11" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Version 20.11" />
|
||||
</component>
|
||||
</project>
|
BIN
TrailBlue.png
Normal file
BIN
TrailBlue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
TrailRed.png
Normal file
BIN
TrailRed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -1,2 +1,49 @@
|
||||
public class GraphicsProgram {
|
||||
import processing.core.PApplet;
|
||||
import processing.core.PImage;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
|
||||
public class GraphicsProgram extends PApplet {
|
||||
|
||||
PImage imgBlue;
|
||||
PImage imgRed;
|
||||
|
||||
public static void main(String[] args) {
|
||||
PApplet.main("Grafics");
|
||||
}
|
||||
|
||||
public void settings() {
|
||||
size(800, 600);
|
||||
imgBlue = loadImage("TrailBlue");
|
||||
imgRed = loadImage("TrailRed");
|
||||
}
|
||||
|
||||
public void drawTrail(Queue<int[]> trail, int playerID){
|
||||
|
||||
int particleSize = 5;
|
||||
|
||||
|
||||
background(255);
|
||||
|
||||
for (int[] koordinates : new LinkedList<>(trail)) {
|
||||
int x = koordinates[0];
|
||||
int y = koordinates[1];
|
||||
|
||||
if(playerID == 1){
|
||||
image(imgBlue, x, y, particleSize, particleSize);
|
||||
} else if (playerID == 2) {
|
||||
image(imgRed, x, y, particleSize, particleSize);
|
||||
}else{
|
||||
fill(0, 255, 0);
|
||||
rect(x, y, particleSize, particleSize);
|
||||
}
|
||||
particleSize ++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void drawEvent(){
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user