GithubHelp home page GithubHelp logo

patrick-reichle / de.htwg.wt.stratego Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markoboger/de.htwg.wt.sudokuinscala

0.0 0.0 1.0 117.26 MB

HTWG Play Scala Starter Template

Home Page: https://playframework.com/documentation/latest/ScalaHome

License: Other

Scala 18.09% HTML 9.28% JavaScript 66.44% CSS 1.24% Shell 4.95%

de.htwg.wt.stratego's Introduction

HTWG play-scala-seed

This is a starter application using Play for the Lecture Web Technologies at HTWG.

Setup

To set up your project follow these steps:

  • Fork this project on github

  • Rename the project on your github account (Settings > Repository name)

  • Load your forked project in IDEA (File > New > Project from Version Controll > Github)

  • Go to build.sbt file, IDEA should offer to import the project structure from sbt. This will take several minutes.

  • Continue only after import finished. That is the case when red fonds disappear.

  • Go to a Scala file. IDEA should offer to connect to a Java VM and Scala SDK.

  • Select Java 1.8

  • Select the same Scala SDK as your project from Software Engineering is running on, Scala 2.12.4 recommended.

  • Open the Project Structure (File > Project Structure)

  • Make sure the Project Structure > Libraries contains the Scala-sdk libraries in the correct version (2.12.4)

  • Make sure your module is not imported twice. If there are two (root, ), delete and keep the root.

  • Make sure in app > controllers you can create new Scala classes from the context menu.

Running

  • In the IDEA Terminal type in sbt run. This will download play, the first time this also takes some time.
sbt run

And then in your browser go to http://localhost:9000. Now your project files are compiled, so this again takes some time the first time arround. The default page is actually a very good introduction to play. Read it!

First changes

Go to the view index.scala.html. Change it, so that the home page just shows "Hello World"

Integrate your Game

To access your existing game from the Software Engineering class do the following

  • In the play project, add a lib folder at the top level.
  • Load your SE game project as a module (File > New > Module from existing Sources)
  • In the project structure, add an Artefact (File > Project Structure > Artefact), select JAR from Module, select your game.
  • Set the output folder for the artefact to the lib folder you just created
  • Generate the jar by (Build > Build Artefacts)
  • Import the jar into IDEA build path (File > Project Structure > Libraries > +)
  • Play automatically uses jars in the lib, but you need to restart the play server

Now you should be able to access the classes of your game from your play Controller classes.

de.htwg.wt.stratego's People

Contributors

markoboger avatar wsargent avatar gmethvin avatar marcospereira avatar nomthy avatar richdougherty avatar

Forkers

lorenzbung

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.