diff --git a/.gitignore b/.gitignore
index 11f5d71..d8f597d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
+
+tronio.jar
\ No newline at end of file
diff --git a/client/public/img/icons/android-chrome-maskable-192x192.png b/client/public/img/icons/android-chrome-maskable-192x192.png
index 791e9c8..3c241fa 100644
Binary files a/client/public/img/icons/android-chrome-maskable-192x192.png and b/client/public/img/icons/android-chrome-maskable-192x192.png differ
diff --git a/client/public/img/icons/android-chrome-maskable-512x512.png b/client/public/img/icons/android-chrome-maskable-512x512.png
index 5f2098e..26bae41 100644
Binary files a/client/public/img/icons/android-chrome-maskable-512x512.png and b/client/public/img/icons/android-chrome-maskable-512x512.png differ
diff --git a/client/src/App.vue b/client/src/App.vue
index 04785d7..ea0934b 100644
--- a/client/src/App.vue
+++ b/client/src/App.vue
@@ -3,7 +3,7 @@

-
Tron.io
+
tron.io
Start
@@ -34,7 +34,6 @@ export default {
this.$buefy.dialog.prompt({
message: 'Choose a name',
trapFocus: true,
- canCancel: false,
inputAttrs: {
placeholder: 'pedro',
minlength: 3,
diff --git a/client/src/components/Game.vue b/client/src/components/Game.vue
index 29fc3d7..8136cbf 100644
--- a/client/src/components/Game.vue
+++ b/client/src/components/Game.vue
@@ -68,11 +68,10 @@ export default {
this.canvas.height = window.innerHeight
this.canvas.addEventListener('mousemove', this.mouseEvent)
this.canvas.addEventListener('touchmove', this.touchEvent)
- this.renderTimer = setInterval(this.render, 1000 / 60)
+ this.renderTimer = setInterval(this.render, 1000 / 120)
},
methods: {
render () {
- this.stats.lastFrame = performance.now()
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height)
this.renderBorders()
@@ -99,6 +98,8 @@ export default {
this.renderMouse()
this.renderDebug()
+
+ this.stats.lastFrame = performance.now()
},
renderBorders () {
this.context.strokeStyle = 'white'
@@ -138,11 +139,11 @@ export default {
this.context.fillStyle = 'white'
this.context.textAlign = 'start'
this.context.fillText('camera x: ' + this.camera.x + ' y:' + this.camera.y, 10, 12)
- // this.context.fillText('a:' + player.angle + ' a_t' + player.targetAngle, 10, 24)
- this.context.fillText('canvasX: ' + canvasX + ' canvasY:' + canvasY, 10, 36)
+ this.context.fillText('mouse x: ' + this.mouse.x + ' y:' + this.mouse.y, 10, 24)
+ this.context.fillText('canvasX: ' + canvasX + ' canvasY: ' + canvasY, 10, 36)
this.context.fillText('Total walls: ' + this.stats.totalWalls, 10, 48)
this.context.fillText('Last update: ' + this.stats.lastUpdateTime, 10, 60)
- const fps = (performance.now() - this.stats.lastFrame) * 60
+ const fps = 1000 / (performance.now() - this.stats.lastFrame)
this.context.fillText('FPS: ' + fps, 10, 72)
},
renderMouse () {
diff --git a/client/src/registerServiceWorker.js b/client/src/registerServiceWorker.js
index 76cede0..89294b3 100644
--- a/client/src/registerServiceWorker.js
+++ b/client/src/registerServiceWorker.js
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import { register } from 'register-service-worker'
+import { ToastProgrammatic as Toast } from 'buefy'
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
@@ -18,12 +19,16 @@ if (process.env.NODE_ENV === 'production') {
},
updatefound () {
console.log('New content is downloading.')
+ Toast.open('Update found, downloading...')
},
updated () {
console.log('New content is available; please refresh.')
+ window.location.reload(true)
+ Toast.open('App updated !')
},
offline () {
console.log('No internet connection found. App is running in offline mode.')
+ Toast.open('No internet connection !')
},
error (error) {
console.error('Error during service worker registration:', error)
diff --git a/client/src/store/socketPlugin.js b/client/src/store/socketPlugin.js
index caeb423..76e8f55 100644
--- a/client/src/store/socketPlugin.js
+++ b/client/src/store/socketPlugin.js
@@ -1,7 +1,7 @@
import { ToastProgrammatic as Toast } from 'buefy'
-const connection = new WebSocket('ws://localhost:8181/socket')
-// const connection = new WebSocket('wss://tronio.gltronic.ovh/socket')
+// const connection = new WebSocket('ws://localhost:8181/socket')
+const connection = new WebSocket('wss://tronio.gltronic.ovh/socket')
export default function createSocketPlugin () {
return store => {
diff --git a/server/.gitignore b/server/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/server/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/server/src/test/java/gltronic/voozik/DemoApplicationTests.java b/server/src/test/java/gltronic/tronio/DemoApplicationTests.java
similarity index 87%
rename from server/src/test/java/gltronic/voozik/DemoApplicationTests.java
rename to server/src/test/java/gltronic/tronio/DemoApplicationTests.java
index 959f824..3c89998 100644
--- a/server/src/test/java/gltronic/voozik/DemoApplicationTests.java
+++ b/server/src/test/java/gltronic/tronio/DemoApplicationTests.java
@@ -1,4 +1,4 @@
-package gltronic.voozik;
+package gltronic.tronio;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/server/target/maven-archiver/pom.properties b/server/target/maven-archiver/pom.properties
index e042275..c836038 100644
--- a/server/target/maven-archiver/pom.properties
+++ b/server/target/maven-archiver/pom.properties
@@ -1,3 +1,3 @@
-artifactId=voozik
+artifactId=tronio
groupId=gltronic
version=0.0.1-SNAPSHOT
diff --git a/server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
index d43349f..63d5040 100644
--- a/server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ b/server/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -1,7 +1,12 @@
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/web/SocketHandler.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/business/IYTSearch.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/business/RoomManager.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/business/IRoomManager.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/web/WebSocketConfiguration.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/VoozikApplication.java
-/home/thomsb/Projets/web/voozik/server/src/main/java/gltronic/voozik/model/BiMap.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/TronIoApplication.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/Game.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/BiMap.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/business/IGameManager.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/business/GameManager.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/Player.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/GameUpdate.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/GameSettings.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/business/SocketUtils.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/model/Wall.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/web/WebSocketConfiguration.java
+/home/thomsb/Projets/web/tronio/server/src/main/java/gltronic/tronio/web/SocketHandler.java
diff --git a/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
index e69de29..3496e8e 100644
--- a/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
+++ b/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
@@ -0,0 +1 @@
+gltronic/tronio/DemoApplicationTests.class
diff --git a/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
index 03dc03e..7db41f6 100644
--- a/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
+++ b/server/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
@@ -1 +1 @@
-/home/thomsb/Projets/web/voozik/server/src/test/java/gltronic/voozik/DemoApplicationTests.java
+/home/thomsb/Projets/web/tronio/server/src/test/java/gltronic/tronio/DemoApplicationTests.java
diff --git a/server/target/surefire-reports/TEST-gltronic.voozik.DemoApplicationTests.xml b/server/target/surefire-reports/TEST-gltronic.voozik.DemoApplicationTests.xml
index 7f03235..1fc5a83 100644
--- a/server/target/surefire-reports/TEST-gltronic.voozik.DemoApplicationTests.xml
+++ b/server/target/surefire-reports/TEST-gltronic.voozik.DemoApplicationTests.xml
@@ -1,9 +1,9 @@
-
+
-
+
@@ -12,9 +12,9 @@
-
+
-
+
@@ -22,17 +22,17 @@
-
+
-
+
-
+
@@ -40,7 +40,7 @@
-
+
@@ -50,5 +50,18 @@
-
+
+ java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
+
+
+
\ No newline at end of file
diff --git a/server/target/surefire-reports/gltronic.voozik.DemoApplicationTests.txt b/server/target/surefire-reports/gltronic.voozik.DemoApplicationTests.txt
index 59cdb84..52bef72 100644
--- a/server/target/surefire-reports/gltronic.voozik.DemoApplicationTests.txt
+++ b/server/target/surefire-reports/gltronic.voozik.DemoApplicationTests.txt
@@ -1,4 +1,7 @@
-------------------------------------------------------------------------------
Test set: gltronic.voozik.DemoApplicationTests
-------------------------------------------------------------------------------
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.292 s - in gltronic.voozik.DemoApplicationTests
+Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in gltronic.voozik.DemoApplicationTests
+gltronic.voozik.DemoApplicationTests Time elapsed: 0.013 s <<< ERROR!
+java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
+
diff --git a/server/target/test-classes/gltronic/voozik/DemoApplicationTests.class b/server/target/test-classes/gltronic/voozik/DemoApplicationTests.class
deleted file mode 100644
index d0f95b3..0000000
Binary files a/server/target/test-classes/gltronic/voozik/DemoApplicationTests.class and /dev/null differ
diff --git a/test.json b/test.json
deleted file mode 100644
index 0c35ed8..0000000
--- a/test.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "type":"gameUpdate",
- "message": [
- {
- "color":"#0deeff",
- "x":361.69764869823257,
- "y":427.9410817135364,
- "angle":0.0,
- "targetAngle":0.0,
- "walls":[
- {"x":323.69764869823257,"y":427.9410817135364},
- {"x":335.69764869823257,"y":427.9410817135364},
- {"x":347.69764869823257,"y":427.9410817135364},
- {"x":359.69764869823257,"y":427.9410817135364}
- ],
- "lastWall":0
- }
- ]
-}
\ No newline at end of file