From 98e177c413b377aec371355edf8ca0d43bde6373 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Sat, 2 Apr 2022 21:50:00 +0200 Subject: [PATCH] Added basis for servlet stuff. --- client/src/main/resources/img/icon.png | Bin 0 -> 17266 bytes client/src/main/resources/ships/corvette.json | 62 ++++++++++++++++++ server/pom.xml | 13 ++++ .../server/StarshipArenaServer.java | 20 +++++- .../server/servlet/ArenasServlet.java | 16 +++++ 5 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 client/src/main/resources/img/icon.png create mode 100644 client/src/main/resources/ships/corvette.json create mode 100644 server/src/main/java/nl/andrewl/starship_arena/server/servlet/ArenasServlet.java diff --git a/client/src/main/resources/img/icon.png b/client/src/main/resources/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b21f0b71273691dc3515cb821a0dce4417147689 GIT binary patch literal 17266 zcma%Db8zHOu-}c1i*4KH#dhvu+sVb)*u2;_?=E(7xm>J^ZQIBp&aC!1Z;JWH3TH`3a1)5=Jgb3^gUp~!<5iE zlO`eD=L-@!-b@>XP2S`^t(=)DXFAkh4hw9;0Uik=?8PzqQ=h*)wM6;$xf9RgIT-pY zF1UxKUkH)ELx!rSpvVR{f3XrzFui{}!1#dx|GEUr4U3^pPt((Rc7WhG|IJ$&bDDDh z3k%4=j113pXCHp4rxjV~F>kL^Rxt)Y)vcXbX;1^u9(LpW!M5tnJI0q!(w1Qfw}%0l z1*Qet=b zq03iuG!pxPmTp7;M+YV7z-+f?GZP8uY}R^NIt(t4TXE) z)E(#GU0YjeQeE<9w!01z5rG3cwK*t$4V~ZVhU@-`HsYV*DvYL&2)4{b8^w?P^-`u( z$J6OFA)L!i_3Zu5l^?*cX7*_e_wx+^rkHw#KxH(MmY zUI7&`dUy9xYy@wF&GxTW4dqzlZ-Fv4LrEjHIQL)riL8ov=nkC*jRBjL^`DzkRVOmL zg8n@bV|3a;ie&Gu71w)Ueph_h7&wfY~!tD1ciq@otG{qtvnWQUa zg_HqK`r7Ts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TU)Xe=; zT9Oxb*r0}MO{=TID(yK5Ke+!{q78Un27{-opUXO@geCyUqGcEW literal 0 HcmV?d00001 diff --git a/client/src/main/resources/ships/corvette.json b/client/src/main/resources/ships/corvette.json new file mode 100644 index 0000000..bc181c8 --- /dev/null +++ b/client/src/main/resources/ships/corvette.json @@ -0,0 +1,62 @@ +{ + "name": "Corvette", + "components": [ + { + "type": "panel", + "name": "Main Fuselage", + "mass": 5000, + "points": [ + {"x": 0.3, "y": 0.6}, + {"x": 0.2, "y": 0.1}, + {"x": 0.1, "y": 0.5}, + {"x": 0.2, "y": 0.8}, + {"x": 0.8, "y": 0.8}, + {"x": 0.9, "y": 0.5}, + {"x": 0.8, "y": 0.1}, + {"x": 0.7, "y": 0.6} + ] + }, + { + "type": "panel", + "name": "Front Cargo Bay", + "mass": 1000, + "points": [ + {"x": 0.4, "y": 0.2}, + {"x": 0.35, "y": 0.6}, + {"x": 0.65, "y": 0.6}, + {"x": 0.6, "y": 0.2} + ] + }, + { + "type": "cockpit", + "mass": 800, + "points": [ + {"x": 0.5, "y": 0.0}, + {"x": 0.4, "y": 0.2}, + {"x": 0.6, "y": 0.2} + ] + }, + { + "type": "gun", + "name": "Port-Side Machine Gun", + "mass": 500, + "location": {"x": 0.15, "y": 0.35}, + "rotation": 0, + "minRotation": -160, + "maxRotation": 5, + "barrelWidth": 0.02, + "barrelLength": 0.2 + }, + { + "type": "gun", + "name": "Starboard-Side Machine Gun", + "mass": 500, + "location": {"x": 0.85, "y": 0.35}, + "rotation": 0, + "minRotation": -5, + "maxRotation": 160, + "barrelWidth": 0.02, + "barrelLength": 0.2 + } + ] +} \ No newline at end of file diff --git a/server/pom.xml b/server/pom.xml index 047266c..085e189 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -23,5 +23,18 @@ core ${project.parent.version} + + + org.eclipse.jetty + jetty-servlet + 11.0.8 + + + + org.slf4j + slf4j-jdk14 + 2.0.0-alpha7 + runtime + \ No newline at end of file diff --git a/server/src/main/java/nl/andrewl/starship_arena/server/StarshipArenaServer.java b/server/src/main/java/nl/andrewl/starship_arena/server/StarshipArenaServer.java index aa4adc6..1779b65 100644 --- a/server/src/main/java/nl/andrewl/starship_arena/server/StarshipArenaServer.java +++ b/server/src/main/java/nl/andrewl/starship_arena/server/StarshipArenaServer.java @@ -1,7 +1,23 @@ package nl.andrewl.starship_arena.server; -public class StarshipArenaServer { - public static void main(String[] args) { +import nl.andrewl.starship_arena.server.servlet.ArenasServlet; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.servlet.ServletHolder; +public class StarshipArenaServer { + public static void main(String[] args) throws Exception { + Server jettyServer = new Server(8080); + Connector connector = new ServerConnector(jettyServer); + jettyServer.addConnector(connector); + + ServletContextHandler servletContext = new ServletContextHandler(); + servletContext.setContextPath("/"); + servletContext.addServlet(new ServletHolder(new ArenasServlet()), "/arenas"); + + jettyServer.setHandler(servletContext); + jettyServer.start(); } } diff --git a/server/src/main/java/nl/andrewl/starship_arena/server/servlet/ArenasServlet.java b/server/src/main/java/nl/andrewl/starship_arena/server/servlet/ArenasServlet.java new file mode 100644 index 0000000..5fdb694 --- /dev/null +++ b/server/src/main/java/nl/andrewl/starship_arena/server/servlet/ArenasServlet.java @@ -0,0 +1,16 @@ +package nl.andrewl.starship_arena.server.servlet; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; + +public class ArenasServlet extends HttpServlet { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + super.doGet(req, resp); + // TODO: Return the list of available arenas. + } +}