diff options
author | jbion <joffrey.bion@amadeus.com> | 2017-01-20 16:11:24 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2017-01-20 16:11:35 +0100 |
commit | b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818 (patch) | |
tree | bdda009d448cb6b56415d90eae90eceb138318e4 /backend/src/main/resources/static | |
parent | Merge remote-tracking branch 'origin/feature/front' (diff) | |
download | seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.tar.gz seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.tar.bz2 seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.zip |
Move frontend and backend into 2 separate subprojects
Diffstat (limited to 'backend/src/main/resources/static')
135 files changed, 249 insertions, 0 deletions
diff --git a/backend/src/main/resources/static/app.js b/backend/src/main/resources/static/app.js new file mode 100644 index 00000000..0d68d2ef --- /dev/null +++ b/backend/src/main/resources/static/app.js @@ -0,0 +1,90 @@ +var stompClient = null; + +function setConnected(connected) { + $("#connect").prop("disabled", connected); + $("#disconnect").prop("disabled", !connected); + if (connected) { + $("#game-list").show(); + } else { + $("#game-list").hide(); + } + $("#greetings").html(""); +} + +function connect() { + var socket = new SockJS('/seven-wonders-websocket'); + stompClient = Stomp.over(socket); + stompClient.connect({}, function (frame) { + setConnected(true); + console.log('Connected: ' + frame); + + stompClient.subscribe('/user/queue/errors', function (msg) { + var error = JSON.parse(msg.body); + console.error(error); + }); + + stompClient.subscribe('/topic/games', function (msg) { + var games = JSON.parse(msg.body); + console.log("Received new games: " + games); + for (var i = 0; i < games.length; i++) { + addNewGame(games[i]); + } + }); + + stompClient.subscribe('/user/queue/join-game', function (msg) { + var game = JSON.parse(msg.body); + console.log("Joined game: " + game); + addNewPlayer(game); + }); + }); +} + +function disconnect() { + if (stompClient !== null) { + stompClient.disconnect(); + } + setConnected(false); + console.log("Disconnected"); +} + +function sendCreateGame(gameName, playerName) { + stompClient.send("/app/lobby/create-game", {}, JSON.stringify({ + 'gameName': gameName, + 'playerName': playerName + })); +} + +function sendJoinGame(gameName, playerName) { + stompClient.send("/app/lobby/join-game", {}, JSON.stringify({ + 'gameName': gameName, + 'playerName': playerName + })); +} + +function addNewGame(game) { + console.log(game); + $("#game-list-content").append('<tr><td>' + game.name + '</td><td><button id="join-' + game.id + + '" type="submit">Join</button></td></tr>'); + $("#join-" + game.id).click(function () { + sendJoinGame(game.name, $("#player-name-field").val()); + }); +} + +function addNewPlayer(player) { + console.log(player); +} + +$(function () { + $("form").on('submit', function (e) { + e.preventDefault(); + }); + $("#connect").click(function () { + connect(); + }); + $("#disconnect").click(function () { + disconnect(); + }); + $("#create-game").click(function () { + sendCreateGame($("#game-name-field").val(), $("#player-name-field").val()); + }); +});
\ No newline at end of file diff --git a/backend/src/main/resources/static/images/background.jpg b/backend/src/main/resources/static/images/background.jpg Binary files differnew file mode 100644 index 00000000..57bdffcf --- /dev/null +++ b/backend/src/main/resources/static/images/background.jpg diff --git a/backend/src/main/resources/static/images/cards/academy.png b/backend/src/main/resources/static/images/cards/academy.png Binary files differnew file mode 100644 index 00000000..d2a75075 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/academy.png diff --git a/backend/src/main/resources/static/images/cards/age1.png b/backend/src/main/resources/static/images/cards/age1.png Binary files differnew file mode 100644 index 00000000..a06332d7 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/age1.png diff --git a/backend/src/main/resources/static/images/cards/age2.png b/backend/src/main/resources/static/images/cards/age2.png Binary files differnew file mode 100644 index 00000000..9b52aa4e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/age2.png diff --git a/backend/src/main/resources/static/images/cards/age3.png b/backend/src/main/resources/static/images/cards/age3.png Binary files differnew file mode 100644 index 00000000..86c983ee --- /dev/null +++ b/backend/src/main/resources/static/images/cards/age3.png diff --git a/backend/src/main/resources/static/images/cards/altar.png b/backend/src/main/resources/static/images/cards/altar.png Binary files differnew file mode 100644 index 00000000..bbde8f2f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/altar.png diff --git a/backend/src/main/resources/static/images/cards/apothecary.png b/backend/src/main/resources/static/images/cards/apothecary.png Binary files differnew file mode 100644 index 00000000..01804c0a --- /dev/null +++ b/backend/src/main/resources/static/images/cards/apothecary.png diff --git a/backend/src/main/resources/static/images/cards/aqueduct.png b/backend/src/main/resources/static/images/cards/aqueduct.png Binary files differnew file mode 100644 index 00000000..c29d9566 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/aqueduct.png diff --git a/backend/src/main/resources/static/images/cards/archeryrange.png b/backend/src/main/resources/static/images/cards/archeryrange.png Binary files differnew file mode 100644 index 00000000..15c6edda --- /dev/null +++ b/backend/src/main/resources/static/images/cards/archeryrange.png diff --git a/backend/src/main/resources/static/images/cards/arena.png b/backend/src/main/resources/static/images/cards/arena.png Binary files differnew file mode 100644 index 00000000..7dc76961 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/arena.png diff --git a/backend/src/main/resources/static/images/cards/arsenal.png b/backend/src/main/resources/static/images/cards/arsenal.png Binary files differnew file mode 100644 index 00000000..fc3f4a27 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/arsenal.png diff --git a/backend/src/main/resources/static/images/cards/barracks.png b/backend/src/main/resources/static/images/cards/barracks.png Binary files differnew file mode 100644 index 00000000..f5a68c17 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/barracks.png diff --git a/backend/src/main/resources/static/images/cards/baths.png b/backend/src/main/resources/static/images/cards/baths.png Binary files differnew file mode 100644 index 00000000..3d99d59d --- /dev/null +++ b/backend/src/main/resources/static/images/cards/baths.png diff --git a/backend/src/main/resources/static/images/cards/bazar.png b/backend/src/main/resources/static/images/cards/bazar.png Binary files differnew file mode 100644 index 00000000..f36e25c2 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/bazar.png diff --git a/backend/src/main/resources/static/images/cards/brickyard.png b/backend/src/main/resources/static/images/cards/brickyard.png Binary files differnew file mode 100644 index 00000000..ae0b7e9b --- /dev/null +++ b/backend/src/main/resources/static/images/cards/brickyard.png diff --git a/backend/src/main/resources/static/images/cards/buildersguild.png b/backend/src/main/resources/static/images/cards/buildersguild.png Binary files differnew file mode 100644 index 00000000..f5402611 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/buildersguild.png diff --git a/backend/src/main/resources/static/images/cards/caravansery.png b/backend/src/main/resources/static/images/cards/caravansery.png Binary files differnew file mode 100644 index 00000000..997bb102 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/caravansery.png diff --git a/backend/src/main/resources/static/images/cards/chamberofcommerce.png b/backend/src/main/resources/static/images/cards/chamberofcommerce.png Binary files differnew file mode 100644 index 00000000..44b5af28 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/chamberofcommerce.png diff --git a/backend/src/main/resources/static/images/cards/circus.png b/backend/src/main/resources/static/images/cards/circus.png Binary files differnew file mode 100644 index 00000000..b1ec4d8b --- /dev/null +++ b/backend/src/main/resources/static/images/cards/circus.png diff --git a/backend/src/main/resources/static/images/cards/claypit.png b/backend/src/main/resources/static/images/cards/claypit.png Binary files differnew file mode 100644 index 00000000..5442248e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/claypit.png diff --git a/backend/src/main/resources/static/images/cards/claypool.png b/backend/src/main/resources/static/images/cards/claypool.png Binary files differnew file mode 100644 index 00000000..873cad47 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/claypool.png diff --git a/backend/src/main/resources/static/images/cards/courthouse.png b/backend/src/main/resources/static/images/cards/courthouse.png Binary files differnew file mode 100644 index 00000000..394901f2 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/courthouse.png diff --git a/backend/src/main/resources/static/images/cards/craftsmensguild.png b/backend/src/main/resources/static/images/cards/craftsmensguild.png Binary files differnew file mode 100644 index 00000000..09bff60e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/craftsmensguild.png diff --git a/backend/src/main/resources/static/images/cards/dispensary.png b/backend/src/main/resources/static/images/cards/dispensary.png Binary files differnew file mode 100644 index 00000000..4917166b --- /dev/null +++ b/backend/src/main/resources/static/images/cards/dispensary.png diff --git a/backend/src/main/resources/static/images/cards/easttradingpost.png b/backend/src/main/resources/static/images/cards/easttradingpost.png Binary files differnew file mode 100644 index 00000000..0c67cc78 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/easttradingpost.png diff --git a/backend/src/main/resources/static/images/cards/excavation.png b/backend/src/main/resources/static/images/cards/excavation.png Binary files differnew file mode 100644 index 00000000..0fe1b01f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/excavation.png diff --git a/backend/src/main/resources/static/images/cards/forestcave.png b/backend/src/main/resources/static/images/cards/forestcave.png Binary files differnew file mode 100644 index 00000000..262fffc6 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/forestcave.png diff --git a/backend/src/main/resources/static/images/cards/fortifications.png b/backend/src/main/resources/static/images/cards/fortifications.png Binary files differnew file mode 100644 index 00000000..3e113473 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/fortifications.png diff --git a/backend/src/main/resources/static/images/cards/forum.png b/backend/src/main/resources/static/images/cards/forum.png Binary files differnew file mode 100644 index 00000000..d6262158 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/forum.png diff --git a/backend/src/main/resources/static/images/cards/foundry.png b/backend/src/main/resources/static/images/cards/foundry.png Binary files differnew file mode 100644 index 00000000..da95a48e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/foundry.png diff --git a/backend/src/main/resources/static/images/cards/gardens.png b/backend/src/main/resources/static/images/cards/gardens.png Binary files differnew file mode 100644 index 00000000..9a49a0ad --- /dev/null +++ b/backend/src/main/resources/static/images/cards/gardens.png diff --git a/backend/src/main/resources/static/images/cards/glassworks.png b/backend/src/main/resources/static/images/cards/glassworks.png Binary files differnew file mode 100644 index 00000000..285d7d54 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/glassworks.png diff --git a/backend/src/main/resources/static/images/cards/guardtower.png b/backend/src/main/resources/static/images/cards/guardtower.png Binary files differnew file mode 100644 index 00000000..524b06f3 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/guardtower.png diff --git a/backend/src/main/resources/static/images/cards/haven.png b/backend/src/main/resources/static/images/cards/haven.png Binary files differnew file mode 100644 index 00000000..e0b345b2 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/haven.png diff --git a/backend/src/main/resources/static/images/cards/laboratory.png b/backend/src/main/resources/static/images/cards/laboratory.png Binary files differnew file mode 100644 index 00000000..4c29e81f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/laboratory.png diff --git a/backend/src/main/resources/static/images/cards/library.png b/backend/src/main/resources/static/images/cards/library.png Binary files differnew file mode 100644 index 00000000..7495a2ca --- /dev/null +++ b/backend/src/main/resources/static/images/cards/library.png diff --git a/backend/src/main/resources/static/images/cards/lighthouse.png b/backend/src/main/resources/static/images/cards/lighthouse.png Binary files differnew file mode 100644 index 00000000..2124811b --- /dev/null +++ b/backend/src/main/resources/static/images/cards/lighthouse.png diff --git a/backend/src/main/resources/static/images/cards/lodge.png b/backend/src/main/resources/static/images/cards/lodge.png Binary files differnew file mode 100644 index 00000000..22758688 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/lodge.png diff --git a/backend/src/main/resources/static/images/cards/loom.png b/backend/src/main/resources/static/images/cards/loom.png Binary files differnew file mode 100644 index 00000000..70bdf375 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/loom.png diff --git a/backend/src/main/resources/static/images/cards/lumberyard.png b/backend/src/main/resources/static/images/cards/lumberyard.png Binary files differnew file mode 100644 index 00000000..8558af1a --- /dev/null +++ b/backend/src/main/resources/static/images/cards/lumberyard.png diff --git a/backend/src/main/resources/static/images/cards/magistratesguild.png b/backend/src/main/resources/static/images/cards/magistratesguild.png Binary files differnew file mode 100644 index 00000000..d7deabb3 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/magistratesguild.png diff --git a/backend/src/main/resources/static/images/cards/marketplace.png b/backend/src/main/resources/static/images/cards/marketplace.png Binary files differnew file mode 100644 index 00000000..cd3676d4 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/marketplace.png diff --git a/backend/src/main/resources/static/images/cards/mine.png b/backend/src/main/resources/static/images/cards/mine.png Binary files differnew file mode 100644 index 00000000..4062775c --- /dev/null +++ b/backend/src/main/resources/static/images/cards/mine.png diff --git a/backend/src/main/resources/static/images/cards/observatory.png b/backend/src/main/resources/static/images/cards/observatory.png Binary files differnew file mode 100644 index 00000000..1da3d7b4 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/observatory.png diff --git a/backend/src/main/resources/static/images/cards/orevein.png b/backend/src/main/resources/static/images/cards/orevein.png Binary files differnew file mode 100644 index 00000000..fabea674 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/orevein.png diff --git a/backend/src/main/resources/static/images/cards/palace.png b/backend/src/main/resources/static/images/cards/palace.png Binary files differnew file mode 100644 index 00000000..1a24890e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/palace.png diff --git a/backend/src/main/resources/static/images/cards/pantheon.png b/backend/src/main/resources/static/images/cards/pantheon.png Binary files differnew file mode 100644 index 00000000..264bae02 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/pantheon.png diff --git a/backend/src/main/resources/static/images/cards/pawnshop.png b/backend/src/main/resources/static/images/cards/pawnshop.png Binary files differnew file mode 100644 index 00000000..30bb3807 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/pawnshop.png diff --git a/backend/src/main/resources/static/images/cards/philosophersguild.png b/backend/src/main/resources/static/images/cards/philosophersguild.png Binary files differnew file mode 100644 index 00000000..f72590f6 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/philosophersguild.png diff --git a/backend/src/main/resources/static/images/cards/press.png b/backend/src/main/resources/static/images/cards/press.png Binary files differnew file mode 100644 index 00000000..c932df06 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/press.png diff --git a/backend/src/main/resources/static/images/cards/quarry.png b/backend/src/main/resources/static/images/cards/quarry.png Binary files differnew file mode 100644 index 00000000..8cdbdb22 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/quarry.png diff --git a/backend/src/main/resources/static/images/cards/sawmill.png b/backend/src/main/resources/static/images/cards/sawmill.png Binary files differnew file mode 100644 index 00000000..5abff473 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/sawmill.png diff --git a/backend/src/main/resources/static/images/cards/school.png b/backend/src/main/resources/static/images/cards/school.png Binary files differnew file mode 100644 index 00000000..ab2218d0 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/school.png diff --git a/backend/src/main/resources/static/images/cards/scientistsguild.png b/backend/src/main/resources/static/images/cards/scientistsguild.png Binary files differnew file mode 100644 index 00000000..7ee639e3 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/scientistsguild.png diff --git a/backend/src/main/resources/static/images/cards/scriptorium.png b/backend/src/main/resources/static/images/cards/scriptorium.png Binary files differnew file mode 100644 index 00000000..36dca27a --- /dev/null +++ b/backend/src/main/resources/static/images/cards/scriptorium.png diff --git a/backend/src/main/resources/static/images/cards/senate.png b/backend/src/main/resources/static/images/cards/senate.png Binary files differnew file mode 100644 index 00000000..ee878ea6 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/senate.png diff --git a/backend/src/main/resources/static/images/cards/shipownersguild.png b/backend/src/main/resources/static/images/cards/shipownersguild.png Binary files differnew file mode 100644 index 00000000..3eecd2da --- /dev/null +++ b/backend/src/main/resources/static/images/cards/shipownersguild.png diff --git a/backend/src/main/resources/static/images/cards/siegeworkshop.png b/backend/src/main/resources/static/images/cards/siegeworkshop.png Binary files differnew file mode 100644 index 00000000..bacf8309 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/siegeworkshop.png diff --git a/backend/src/main/resources/static/images/cards/spiesguild.png b/backend/src/main/resources/static/images/cards/spiesguild.png Binary files differnew file mode 100644 index 00000000..85e28d9e --- /dev/null +++ b/backend/src/main/resources/static/images/cards/spiesguild.png diff --git a/backend/src/main/resources/static/images/cards/stables.png b/backend/src/main/resources/static/images/cards/stables.png Binary files differnew file mode 100644 index 00000000..48c963f0 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/stables.png diff --git a/backend/src/main/resources/static/images/cards/statue.png b/backend/src/main/resources/static/images/cards/statue.png Binary files differnew file mode 100644 index 00000000..55aaa5cb --- /dev/null +++ b/backend/src/main/resources/static/images/cards/statue.png diff --git a/backend/src/main/resources/static/images/cards/stockade.png b/backend/src/main/resources/static/images/cards/stockade.png Binary files differnew file mode 100644 index 00000000..37741429 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/stockade.png diff --git a/backend/src/main/resources/static/images/cards/stonepit.png b/backend/src/main/resources/static/images/cards/stonepit.png Binary files differnew file mode 100644 index 00000000..724900c7 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/stonepit.png diff --git a/backend/src/main/resources/static/images/cards/strategistsguild.png b/backend/src/main/resources/static/images/cards/strategistsguild.png Binary files differnew file mode 100644 index 00000000..ae186a4b --- /dev/null +++ b/backend/src/main/resources/static/images/cards/strategistsguild.png diff --git a/backend/src/main/resources/static/images/cards/study.png b/backend/src/main/resources/static/images/cards/study.png Binary files differnew file mode 100644 index 00000000..d8b9ebf9 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/study.png diff --git a/backend/src/main/resources/static/images/cards/tavern.png b/backend/src/main/resources/static/images/cards/tavern.png Binary files differnew file mode 100644 index 00000000..418b0fb2 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/tavern.png diff --git a/backend/src/main/resources/static/images/cards/temple.png b/backend/src/main/resources/static/images/cards/temple.png Binary files differnew file mode 100644 index 00000000..9a8d89dc --- /dev/null +++ b/backend/src/main/resources/static/images/cards/temple.png diff --git a/backend/src/main/resources/static/images/cards/theater.png b/backend/src/main/resources/static/images/cards/theater.png Binary files differnew file mode 100644 index 00000000..0d5b2b01 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/theater.png diff --git a/backend/src/main/resources/static/images/cards/timberyard.png b/backend/src/main/resources/static/images/cards/timberyard.png Binary files differnew file mode 100644 index 00000000..0f20547f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/timberyard.png diff --git a/backend/src/main/resources/static/images/cards/townhall.png b/backend/src/main/resources/static/images/cards/townhall.png Binary files differnew file mode 100644 index 00000000..d0638739 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/townhall.png diff --git a/backend/src/main/resources/static/images/cards/tradersguild.png b/backend/src/main/resources/static/images/cards/tradersguild.png Binary files differnew file mode 100644 index 00000000..15777e77 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/tradersguild.png diff --git a/backend/src/main/resources/static/images/cards/trainingground.png b/backend/src/main/resources/static/images/cards/trainingground.png Binary files differnew file mode 100644 index 00000000..d59ef4f8 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/trainingground.png diff --git a/backend/src/main/resources/static/images/cards/treefarm.png b/backend/src/main/resources/static/images/cards/treefarm.png Binary files differnew file mode 100644 index 00000000..18cf228f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/treefarm.png diff --git a/backend/src/main/resources/static/images/cards/university.png b/backend/src/main/resources/static/images/cards/university.png Binary files differnew file mode 100644 index 00000000..c9ca8a80 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/university.png diff --git a/backend/src/main/resources/static/images/cards/vineyard.png b/backend/src/main/resources/static/images/cards/vineyard.png Binary files differnew file mode 100644 index 00000000..58fa8ee1 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/vineyard.png diff --git a/backend/src/main/resources/static/images/cards/walls.png b/backend/src/main/resources/static/images/cards/walls.png Binary files differnew file mode 100644 index 00000000..3823c62f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/walls.png diff --git a/backend/src/main/resources/static/images/cards/westtradingpost.png b/backend/src/main/resources/static/images/cards/westtradingpost.png Binary files differnew file mode 100644 index 00000000..b536269f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/westtradingpost.png diff --git a/backend/src/main/resources/static/images/cards/workersguild.png b/backend/src/main/resources/static/images/cards/workersguild.png Binary files differnew file mode 100644 index 00000000..de4f452f --- /dev/null +++ b/backend/src/main/resources/static/images/cards/workersguild.png diff --git a/backend/src/main/resources/static/images/cards/workshop.png b/backend/src/main/resources/static/images/cards/workshop.png Binary files differnew file mode 100644 index 00000000..8f585d61 --- /dev/null +++ b/backend/src/main/resources/static/images/cards/workshop.png diff --git a/backend/src/main/resources/static/images/tokens/buy.png b/backend/src/main/resources/static/images/tokens/buy.png Binary files differnew file mode 100644 index 00000000..07af65a3 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/buy.png diff --git a/backend/src/main/resources/static/images/tokens/card.png b/backend/src/main/resources/static/images/tokens/card.png Binary files differnew file mode 100644 index 00000000..fcdbc068 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/card.png diff --git a/backend/src/main/resources/static/images/tokens/check.png b/backend/src/main/resources/static/images/tokens/check.png Binary files differnew file mode 100644 index 00000000..98db5be0 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/check.png diff --git a/backend/src/main/resources/static/images/tokens/clay.png b/backend/src/main/resources/static/images/tokens/clay.png Binary files differnew file mode 100644 index 00000000..72fc0b0e --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/clay.png diff --git a/backend/src/main/resources/static/images/tokens/coin.png b/backend/src/main/resources/static/images/tokens/coin.png Binary files differnew file mode 100644 index 00000000..f4813042 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/coin.png diff --git a/backend/src/main/resources/static/images/tokens/coin1.png b/backend/src/main/resources/static/images/tokens/coin1.png Binary files differnew file mode 100644 index 00000000..dd57e5f0 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/coin1.png diff --git a/backend/src/main/resources/static/images/tokens/coin3.png b/backend/src/main/resources/static/images/tokens/coin3.png Binary files differnew file mode 100644 index 00000000..546d41b6 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/coin3.png diff --git a/backend/src/main/resources/static/images/tokens/free.png b/backend/src/main/resources/static/images/tokens/free.png Binary files differnew file mode 100644 index 00000000..1c8d0782 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/free.png diff --git a/backend/src/main/resources/static/images/tokens/glass.png b/backend/src/main/resources/static/images/tokens/glass.png Binary files differnew file mode 100644 index 00000000..61fd2be5 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/glass.png diff --git a/backend/src/main/resources/static/images/tokens/linen.png b/backend/src/main/resources/static/images/tokens/linen.png Binary files differnew file mode 100644 index 00000000..294adcb2 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/linen.png diff --git a/backend/src/main/resources/static/images/tokens/no.png b/backend/src/main/resources/static/images/tokens/no.png Binary files differnew file mode 100644 index 00000000..78d09fea --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/no.png diff --git a/backend/src/main/resources/static/images/tokens/ore.png b/backend/src/main/resources/static/images/tokens/ore.png Binary files differnew file mode 100644 index 00000000..c2149daa --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/ore.png diff --git a/backend/src/main/resources/static/images/tokens/paper.png b/backend/src/main/resources/static/images/tokens/paper.png Binary files differnew file mode 100644 index 00000000..91a59221 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/paper.png diff --git a/backend/src/main/resources/static/images/tokens/pyramid-stage0.png b/backend/src/main/resources/static/images/tokens/pyramid-stage0.png Binary files differnew file mode 100644 index 00000000..b6a3977f --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/pyramid-stage0.png diff --git a/backend/src/main/resources/static/images/tokens/pyramid-stage1.png b/backend/src/main/resources/static/images/tokens/pyramid-stage1.png Binary files differnew file mode 100644 index 00000000..ead4a34e --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/pyramid-stage1.png diff --git a/backend/src/main/resources/static/images/tokens/pyramid-stage2.png b/backend/src/main/resources/static/images/tokens/pyramid-stage2.png Binary files differnew file mode 100644 index 00000000..7239a3a4 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/pyramid-stage2.png diff --git a/backend/src/main/resources/static/images/tokens/pyramid-stage3.png b/backend/src/main/resources/static/images/tokens/pyramid-stage3.png Binary files differnew file mode 100644 index 00000000..cab9912b --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/pyramid-stage3.png diff --git a/backend/src/main/resources/static/images/tokens/pyramid.png b/backend/src/main/resources/static/images/tokens/pyramid.png Binary files differnew file mode 100644 index 00000000..074247da --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/pyramid.png diff --git a/backend/src/main/resources/static/images/tokens/stone.png b/backend/src/main/resources/static/images/tokens/stone.png Binary files differnew file mode 100644 index 00000000..674c40db --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/stone.png diff --git a/backend/src/main/resources/static/images/tokens/trash.png b/backend/src/main/resources/static/images/tokens/trash.png Binary files differnew file mode 100644 index 00000000..086df817 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/trash.png diff --git a/backend/src/main/resources/static/images/tokens/victory1.png b/backend/src/main/resources/static/images/tokens/victory1.png Binary files differnew file mode 100644 index 00000000..6b9aff29 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/victory1.png diff --git a/backend/src/main/resources/static/images/tokens/victory3.png b/backend/src/main/resources/static/images/tokens/victory3.png Binary files differnew file mode 100644 index 00000000..474cb30c --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/victory3.png diff --git a/backend/src/main/resources/static/images/tokens/victory5.png b/backend/src/main/resources/static/images/tokens/victory5.png Binary files differnew file mode 100644 index 00000000..ad042119 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/victory5.png diff --git a/backend/src/main/resources/static/images/tokens/victoryminus1.png b/backend/src/main/resources/static/images/tokens/victoryminus1.png Binary files differnew file mode 100644 index 00000000..00a615c7 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/victoryminus1.png diff --git a/backend/src/main/resources/static/images/tokens/wood.png b/backend/src/main/resources/static/images/tokens/wood.png Binary files differnew file mode 100644 index 00000000..09a4ede8 --- /dev/null +++ b/backend/src/main/resources/static/images/tokens/wood.png diff --git a/backend/src/main/resources/static/images/wonders/alexandriaA.png b/backend/src/main/resources/static/images/wonders/alexandriaA.png Binary files differnew file mode 100644 index 00000000..416d534e --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/alexandriaA.png diff --git a/backend/src/main/resources/static/images/wonders/alexandriaB.png b/backend/src/main/resources/static/images/wonders/alexandriaB.png Binary files differnew file mode 100644 index 00000000..205a5256 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/alexandriaB.png diff --git a/backend/src/main/resources/static/images/wonders/babylonA.png b/backend/src/main/resources/static/images/wonders/babylonA.png Binary files differnew file mode 100644 index 00000000..f8e3725e --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/babylonA.png diff --git a/backend/src/main/resources/static/images/wonders/babylonB.png b/backend/src/main/resources/static/images/wonders/babylonB.png Binary files differnew file mode 100644 index 00000000..53f6f045 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/babylonB.png diff --git a/backend/src/main/resources/static/images/wonders/ephesosA.png b/backend/src/main/resources/static/images/wonders/ephesosA.png Binary files differnew file mode 100644 index 00000000..285c8edf --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/ephesosA.png diff --git a/backend/src/main/resources/static/images/wonders/ephesosB.png b/backend/src/main/resources/static/images/wonders/ephesosB.png Binary files differnew file mode 100644 index 00000000..1e0e2541 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/ephesosB.png diff --git a/backend/src/main/resources/static/images/wonders/extra/agrigentoA.jpg b/backend/src/main/resources/static/images/wonders/extra/agrigentoA.jpg Binary files differnew file mode 100644 index 00000000..76ba8195 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/agrigentoA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/angkorwatA.jpg b/backend/src/main/resources/static/images/wonders/extra/angkorwatA.jpg Binary files differnew file mode 100644 index 00000000..32f52514 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/angkorwatA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/angkorwatB.jpg b/backend/src/main/resources/static/images/wonders/extra/angkorwatB.jpg Binary files differnew file mode 100644 index 00000000..c3f4304e --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/angkorwatB.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/avalonA.jpg b/backend/src/main/resources/static/images/wonders/extra/avalonA.jpg Binary files differnew file mode 100644 index 00000000..7f7f0678 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/avalonA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/ctesiphonB.jpg b/backend/src/main/resources/static/images/wonders/extra/ctesiphonB.jpg Binary files differnew file mode 100644 index 00000000..c00b40ac --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/ctesiphonB.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/iramA.jpg b/backend/src/main/resources/static/images/wonders/extra/iramA.jpg Binary files differnew file mode 100644 index 00000000..d2c24e95 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/iramA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/persepolisA.jpg b/backend/src/main/resources/static/images/wonders/extra/persepolisA.jpg Binary files differnew file mode 100644 index 00000000..2caa4f89 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/persepolisA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/romaA.jpg b/backend/src/main/resources/static/images/wonders/extra/romaA.jpg Binary files differnew file mode 100644 index 00000000..c54bc820 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/romaA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/sangri-laA.jpg b/backend/src/main/resources/static/images/wonders/extra/sangri-laA.jpg Binary files differnew file mode 100644 index 00000000..1c5dad97 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/sangri-laA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/spahanA.jpg b/backend/src/main/resources/static/images/wonders/extra/spahanA.jpg Binary files differnew file mode 100644 index 00000000..ab2cfc84 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/spahanA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/the-great-wallA.jpg b/backend/src/main/resources/static/images/wonders/extra/the-great-wallA.jpg Binary files differnew file mode 100644 index 00000000..4aacd39b --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/the-great-wallA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/veniseA.jpg b/backend/src/main/resources/static/images/wonders/extra/veniseA.jpg Binary files differnew file mode 100644 index 00000000..55ec00b5 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/veniseA.jpg diff --git a/backend/src/main/resources/static/images/wonders/extra/veniseB.jpg b/backend/src/main/resources/static/images/wonders/extra/veniseB.jpg Binary files differnew file mode 100644 index 00000000..e18f3a12 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/extra/veniseB.jpg diff --git a/backend/src/main/resources/static/images/wonders/gizahA.png b/backend/src/main/resources/static/images/wonders/gizahA.png Binary files differnew file mode 100644 index 00000000..5e755594 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/gizahA.png diff --git a/backend/src/main/resources/static/images/wonders/gizahB.png b/backend/src/main/resources/static/images/wonders/gizahB.png Binary files differnew file mode 100644 index 00000000..60b90fed --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/gizahB.png diff --git a/backend/src/main/resources/static/images/wonders/halikarnassusA.png b/backend/src/main/resources/static/images/wonders/halikarnassusA.png Binary files differnew file mode 100644 index 00000000..5e6acc36 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/halikarnassusA.png diff --git a/backend/src/main/resources/static/images/wonders/halikarnassusB.png b/backend/src/main/resources/static/images/wonders/halikarnassusB.png Binary files differnew file mode 100644 index 00000000..42d67786 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/halikarnassusB.png diff --git a/backend/src/main/resources/static/images/wonders/olympiaA.png b/backend/src/main/resources/static/images/wonders/olympiaA.png Binary files differnew file mode 100644 index 00000000..315c090b --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/olympiaA.png diff --git a/backend/src/main/resources/static/images/wonders/olympiaB.png b/backend/src/main/resources/static/images/wonders/olympiaB.png Binary files differnew file mode 100644 index 00000000..a6c81af6 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/olympiaB.png diff --git a/backend/src/main/resources/static/images/wonders/rhodosA.png b/backend/src/main/resources/static/images/wonders/rhodosA.png Binary files differnew file mode 100644 index 00000000..13ea69e1 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/rhodosA.png diff --git a/backend/src/main/resources/static/images/wonders/rhodosB.png b/backend/src/main/resources/static/images/wonders/rhodosB.png Binary files differnew file mode 100644 index 00000000..2cfa4e18 --- /dev/null +++ b/backend/src/main/resources/static/images/wonders/rhodosB.png diff --git a/backend/src/main/resources/static/index.html b/backend/src/main/resources/static/index.html new file mode 100644 index 00000000..d5ec178d --- /dev/null +++ b/backend/src/main/resources/static/index.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<head> + <title>Seven Wonders</title> + <link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + <link href="/main.css" rel="stylesheet"> + <script src="/webjars/jquery/jquery.min.js"></script> + <script src="/webjars/sockjs-client/sockjs.min.js"></script> + <script src="/webjars/stomp-websocket/stomp.min.js"></script> + <script src="app.js"></script> +</head> +<body> +<noscript> + <h2 style="color: #ff0000">Seems your browser doesn't support Javascript! Websocket relies on Javascript being + enabled. Please enable Javascript and reload this page!</h2> +</noscript> + +<h1>Seven Wonders</h1> + +<p>This is a stub index page for the project, for the sake of vertical completeness. We will soon get to work on it!</p> + +<a href="test.html">Go to WS test page</a> + + +<h2>Connection</h2> + +<form class="form-inline"> + <div class="form-group"> + <label for="connect">WebSocket connection:</label> + <button id="connect" class="btn btn-default" type="submit">Connect</button> + <button id="disconnect" class="btn btn-default" type="submit" disabled="disabled">Disconnect</button> + </div> +</form> + +<h2>Games</h2> + +<form class="form-inline"> + <div class="form-group"> + <label for="player-name-field">Player name</label> + <input id="player-name-field"> + </div> +</form> + +<table id="game-list" class="table table-striped"> + <thead> + <tr> + <th>Id</th> + <th></th> + </tr> + </thead> + <tbody id="game-list-content"> + </tbody> +</table> + +<form class="form-inline"> + <div class="form-group"> + <label for="game-name-field">Game name</label> + <input id="game-name-field"> + <button id="create-game" class="btn btn-default" type="submit">Create</button> + </div> +</form> + +</body> +</html>
\ No newline at end of file diff --git a/backend/src/main/resources/static/test-ws.js b/backend/src/main/resources/static/test-ws.js new file mode 100644 index 00000000..1c64349e --- /dev/null +++ b/backend/src/main/resources/static/test-ws.js @@ -0,0 +1,40 @@ +var stompClient = null; + +function connect() { + console.log('Connecting...'); + var socket = new SockJS('/seven-wonders-websocket'); + stompClient = Stomp.over(socket); + stompClient.connect({}, function (frame) { + console.log('Connected: ' + frame); + subscribeTo('/user/queue/errors'); + }); +} + +function send(endpoint, payload) { + stompClient.send(endpoint, {}, payload); +} + +function subscribeTo(endpoint) { + $("#test-feeds").prepend('<tr><td>' + endpoint + '</td><td>Subscribed</td></tr>'); + stompClient.subscribe(endpoint, function (data) { + $("#test-feeds").prepend('<tr><td>' + endpoint + '</td><td>Received: <pre>' + data.body + '</pre></td></tr>'); + }); +} + +$(function () { + $("form").on('submit', function (e) { + e.preventDefault(); + }); + $("#send-btn").click(function () { + var endpoint = $("#path-field").val(); + var payload = $("#payload-field").val(); + send(endpoint, payload); + }); + $("#subscribe-btn").click(function () { + var endpoint = $("#subscribe-path-field").val(); + subscribeTo(endpoint); + }); +}); + +// auto-connect +connect();
\ No newline at end of file diff --git a/backend/src/main/resources/static/test.html b/backend/src/main/resources/static/test.html new file mode 100644 index 00000000..e19f9eb3 --- /dev/null +++ b/backend/src/main/resources/static/test.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<head> + <title>Seven Wonders</title> + <link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + <link href="/main.css" rel="stylesheet"> + <script src="/webjars/jquery/jquery.min.js"></script> + <script src="/webjars/sockjs-client/sockjs.min.js"></script> + <script src="/webjars/stomp-websocket/stomp.min.js"></script> + <script src="test-ws.js"></script> +</head> +<body> +<noscript> + <h2 style="color: #ff0000">Seems your browser doesn't support Javascript! Websocket relies on Javascript being + enabled. Please enable Javascript and reload this page!</h2> +</noscript> + +<h1>Seven Wonders Test Page</h1> + +<h2>WS messages tests</h2> + +<form class="form-inline"> + <div class="form-group"> + <label for="subscribe-path-field">Path:</label> + <input id="subscribe-path-field" placeholder="path"> + <button id="subscribe-btn" class="btn btn-default" type="submit">Subscribe</button> + </div> +</form> + +<form class="form-inline"> + <div class="form-group"> + <label for="path-field">Path:</label> + <input id="path-field" placeholder="path"> + <label for="payload-field">Payload:</label> + <input id="payload-field" placeholder="JSON payload"> + <button id="send-btn" class="btn btn-default" type="submit">Send</button> + </div> +</form> + +<h2>Subscribed feeds</h2> + +<table class="table table-striped"> + <thead> + <tr> + <th>Endpoint</th> + <th>Data received</th> + </tr> + </thead> + <tbody id="test-feeds"> + </tbody> +</table> + + +</body> +</html>
\ No newline at end of file |