debut d'une nouvelle aventure entre frere QLF

main
Makaci Michael Gabriel ago%!(EXTRA string=1 year)
parent 4f362e00cc
commit 3076db801b
  1. 1
      .gitignore
  2. 3
      .gitmodules
  3. 2
      LICENSE
  4. BIN
      assets/KRITA/ANTIMATTER.kra
  5. BIN
      assets/KRITA/SKAMKRAFTLOGO.kra
  6. BIN
      assets/KRITA/SKAMKRAFTLOGO1.kra
  7. BIN
      assets/KRITA/agent.kra
  8. BIN
      assets/KRITA/asteroid1.kra
  9. BIN
      assets/KRITA/asteroid2.kra
  10. BIN
      assets/KRITA/asteroid3.kra
  11. BIN
      assets/KRITA/asteroid4.kra
  12. BIN
      assets/KRITA/background.kra
  13. BIN
      assets/KRITA/backgroundfinal.kra
  14. BIN
      assets/KRITA/blackhole.kra
  15. BIN
      assets/KRITA/bluesystem.kra
  16. BIN
      assets/KRITA/greensystem.kra
  17. BIN
      assets/KRITA/jumpgate.kra
  18. BIN
      assets/KRITA/medkit.kra
  19. BIN
      assets/KRITA/pinksystem.kra
  20. BIN
      assets/KRITA/planetproto.kra
  21. BIN
      assets/KRITA/plastic.kra
  22. BIN
      assets/KRITA/procurement.kra
  23. BIN
      assets/KRITA/redsystem.kra
  24. BIN
      assets/KRITA/shuttle.kra
  25. BIN
      assets/KRITA/spaceship.kra
  26. BIN
      assets/KRITA/spaceshiporbits.kra
  27. BIN
      assets/KRITA/transportation.kra
  28. BIN
      assets/KRITA/whitehole.kra
  29. BIN
      assets/KRITA/yellowsystem.kra
  30. BIN
      assets/contracts/procurement.png
  31. BIN
      assets/contracts/shuttle.png
  32. BIN
      assets/contracts/transportation.png
  33. BIN
      assets/fonts/Pixellari.ttf
  34. BIN
      assets/img/background.png
  35. BIN
      assets/logo/Offre.png
  36. BIN
      assets/logo/elephant.png
  37. BIN
      assets/logo/logoblanc.png
  38. BIN
      assets/logo/logoblancnotext.png
  39. BIN
      assets/logo/logonoir.png
  40. BIN
      assets/menu/contracts.png
  41. BIN
      assets/menu/home.png
  42. BIN
      assets/menu/info.png
  43. BIN
      assets/menu/leaderboard.png
  44. BIN
      assets/menu/ships.png
  45. BIN
      assets/planets/asteroid1.png
  46. BIN
      assets/planets/asteroid2.png
  47. BIN
      assets/planets/asteroid3.png
  48. BIN
      assets/planets/asteroid4.png
  49. BIN
      assets/planets/blackhole.png
  50. BIN
      assets/planets/jumpgate.png
  51. BIN
      assets/planets/planetproto.png
  52. BIN
      assets/planets/whitehole.png
  53. BIN
      assets/ressources/ANTIMATTER.png
  54. BIN
      assets/ressources/medkit.png
  55. BIN
      assets/sounds/skamkraft_main_theme.mp3
  56. BIN
      assets/spaceships/spaceship.png
  57. BIN
      assets/spaceships/spaceshiporbits.png
  58. BIN
      assets/systems/bluesystem.png
  59. BIN
      assets/systems/greensystem.png
  60. BIN
      assets/systems/pinksystem.png
  61. BIN
      assets/systems/redsystem.png
  62. BIN
      assets/systems/yellowsystem.png
  63. 5
      css/style.css
  64. BIN
      favicon.ico
  65. 15
      index.html
  66. 41
      js/Render/renderer.js
  67. 0
      js/index.js
  68. 1
      js/lib/fabric.js
  69. 85
      js/main.js
  70. 1
      js/skama_code
  71. 19
      templates/index.html
  72. 1
      token

1
.gitignore vendored

@ -0,0 +1 @@
/.vs/

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "js/skama_code"]
path = js/skama_code
url = https://github.com/anulax1225/skama_code.git

@ -0,0 +1,2 @@
DO NOT USE THIS CODE OR LOOK AT IT IF YOU ARE NOT ALLOWED TO
IF YOU DO YOU CAN'T USE OR TEACH THE KNOWLEAGE YOU ACQUEIRED.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -1,5 +0,0 @@
canvas {
width: 50%;
border: 2px solid black;
border-radius: 5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Skamkraft</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="height=device-height, initial-scale=1.0">
<script src="js/lib/fabric.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script type="module" src="js/index.js" defer></script>
</head>
<body>
</body>
</html>

@ -1,41 +0,0 @@
class renderer {
constructor(canvas) {
this.canvas = canvas;
this.ctx = canvas.getContext("2d");
this.waypoints = [];
this.ships = [];
}
drawSystem() {
const canvas = document.getElementById("canvas");
let w = canvas.width;
let h = canvas.height;
const ctx = canvas.getContext("2d");
this.waypoints.forEach(waypoint => {
switch (waypoint.type) {
case "PLANET":
drawWaypoint(waypoint, ctx, w/2, h/2, 'green');
break;
case "ASTEROID":
drawWaypoint(waypoint, ctx, w/2, h/2, 'blue');
break;
case "GAS_GIANT":
drawWaypoint(waypoint, ctx, w/2, h/2, 'red');
break;
}
});
}
drawShips() {
}
drawWaypoint(wayPoint, ctx, w, h, color) {
ctx.beginPath();
ctx.fillStyle = color;
ctx.arc(wayPoint.x/offset.x + w, wayPoint.y/offset.y + h, 1, 0, 2 * Math.PI);
ctx.fill();
}
}

File diff suppressed because one or more lines are too long

@ -1,85 +0,0 @@
let token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGlmaWVyIjoiQU5OTk5VTEFYMTIyNSIsInZlcnNpb24iOiJ2Mi4xLjEiLCJyZXNldF9kYXRlIjoiMjAyMy0xMS0wNCIsImlhdCI6MTcwMDIyNDU5MSwic3ViIjoiYWdlbnQtdG9rZW4ifQ.r05mWtD5FjC4s6Td-ycmHdzL7C2s75lz3q7OBmWeCqUUZ1ejPsRGQRWJDPmIh1kAqO4D9FFs3GCTPZUn1KsnQ-xmDvsIi_mqC1gJV-Q0irI7gwfsGXbfLaVCXo-Q98C_QWRh-O_xkrbhJkCcvnwdEhZm7FnZ3PL4XXKrG0XNa98JrnmG0qlz0cv8V9Q0sSIwXZbvA9BrhuV8PK7_YzPc6LZuNqgPeKiX_B-tSIHHl6Sr1EzuydnczmuS-xKQnbhmcqnpaCXzQmJr7tA8KLgu70KqpPCvA8AI6PLmBlvPWtZ20RdzezqlBh6S9SrBzQ9R0zr_9RyJxq28ws2jnHpVPw";
let offset = {
x: 10,
y: 10
};
function initGame() {
const settings = {
async: true,
crossDomain: true,
url: 'https://api.spacetraders.io/v2/register',
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json'
},
processData: false,
data: '{\n "faction": "COSMIC",\n "symbol": "ANNNNulax1225",\n "email": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
}
function getAgent() {
const settings = {
async: true,
crossDomain: true,
url: 'https://api.spacetraders.io/v2/my/agent',
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${token}`
}
};
$.ajax(settings).done(function (reponse) {
$('.main-window').prepend(`
<article class="agent-card">
<p class="account">${reponse.data.accountId}</p>
<p class="symbol">${reponse.data.symbol}</p>
<p class="headquarters">${reponse.data.headquarters}</p>
<p class="credits">${reponse.data.credits}</p>
<p class="startingFaction">${reponse.data.startingFaction}</p>
<p class="shipCount">${reponse.data.shipCount}</p>
</article>
`);
let metaSystem = reponse.data.headquarters.split("-");
getSystem(metaSystem[0] + "-" + metaSystem[1]);
});
}
function getWayPoint(wayPoint) {
const settings = {
async: true,
crossDomain: true,
url: `https://api.spacetraders.io/v2/systems/systemSymbol/waypoints/waypointSymbol`,
method: 'GET',
headers: {
Accept: 'application/json'
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
};
function getSystem(system) {
const settings = {
async: true,
crossDomain: true,
url: `https://api.spacetraders.io/v2/systems/${system}`,
method: 'GET',
headers: {
Accept: 'application/json'
}
};
$.ajax(settings).done(function (response) {
drawSystem(response.data.waypoints);
});
}
getAgent();

@ -0,0 +1 @@
Subproject commit c7a661cc5f55e455cd4612b7f2d2666f883a9d9e

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/style.css">
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="../js/main.js"></script>
<title>Space traders</title>
</head>
<body>
<main class="main-window">
<input id="token" type="text">
<br>
<canvas id="canvas"></canvas>
</main>
</body>
</html>

@ -1 +0,0 @@
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGlmaWVyIjoiQU5OTk5VTEFYMTIyNSIsInZlcnNpb24iOiJ2Mi4xLjEiLCJyZXNldF9kYXRlIjoiMjAyMy0xMS0wNCIsImlhdCI6MTcwMDIyNDU5MSwic3ViIjoiYWdlbnQtdG9rZW4ifQ.r05mWtD5FjC4s6Td-ycmHdzL7C2s75lz3q7OBmWeCqUUZ1ejPsRGQRWJDPmIh1kAqO4D9FFs3GCTPZUn1KsnQ-xmDvsIi_mqC1gJV-Q0irI7gwfsGXbfLaVCXo-Q98C_QWRh-O_xkrbhJkCcvnwdEhZm7FnZ3PL4XXKrG0XNa98JrnmG0qlz0cv8V9Q0sSIwXZbvA9BrhuV8PK7_YzPc6LZuNqgPeKiX_B-tSIHHl6Sr1EzuydnczmuS-xKQnbhmcqnpaCXzQmJr7tA8KLgu70KqpPCvA8AI6PLmBlvPWtZ20RdzezqlBh6S9SrBzQ9R0zr_9RyJxq28ws2jnHpVPw
Loading…
Cancel
Save