SHARE
TWEET

Untitled

a guest Jun 24th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.monterinio.games.asteroids.player.view;
  2.  
  3. public class PlayerView extends GameObjectView {
  4.  
  5.   public Player player;
  6.  
  7.   public PlayerView(Node view, Player gameObject) {
  8.       super(view);
  9.       this.player = gameObject;
  10.   }
  11. }
  12.  
  13.  
  14. package org.monterinio.games.asteroids.player.model;
  15.  
  16. public class Player extends GameObject {
  17.  
  18.   private String name;
  19.   private double angle;
  20.   private List<Bullet> bullets;
  21.   private AbstractMovementSignals movementSignals;
  22.   private AbstractRotationSignals rotationSignals;
  23.   private AbstractActionSignals actionSignals;
  24.  
  25.   public Player(String name) {
  26.     this.name = name;
  27.     this.movementSignals = new BasicMovementSignals();
  28.     this.rotationSignals = new BasicRotationSignals();
  29.     this.actionSignals = new BasicActionSignals();
  30.     this.bullets = new ArrayList<>();
  31.   }
  32. }
  33.      
  34. <dependencies>
  35.     <dependency>
  36.         <groupId>org.openjfx</groupId>
  37.         <artifactId>javafx-controls</artifactId>
  38.         <version>11.0.2</version>
  39.     </dependency>
  40.     <dependency>
  41.         <groupId>org.openjfx</groupId>
  42.         <artifactId>javafx-fxml</artifactId>
  43.         <version>11.0.2</version>
  44.     </dependency>
  45.     <dependency>
  46.         <groupId>com.airhacks</groupId>
  47.         <artifactId>afterburner.fx</artifactId>
  48.         <version>1.7.0</version>
  49.     </dependency>
  50.     <dependency>
  51.         <groupId>javax.annotation</groupId>
  52.         <artifactId>javax.annotation-api</artifactId>
  53.         <version>1.3.2</version>
  54.     </dependency>
  55.  
  56.     <!-- TEST -->
  57.     <dependency>
  58.         <groupId>org.spockframework</groupId>
  59.         <artifactId>spock-core</artifactId>
  60.         <version>1.3-groovy-2.5</version>
  61.         <scope>test</scope>
  62.     </dependency>
  63.     <dependency>
  64.         <groupId>org.testfx</groupId>
  65.         <artifactId>testfx-core</artifactId>
  66.         <version>4.0.15-alpha</version>
  67.         <scope>test</scope>
  68.     </dependency>
  69.     <dependency>
  70.         <groupId>org.testfx</groupId>
  71.         <artifactId>testfx-spock</artifactId>
  72.         <version>4.0.15-alpha</version>
  73.         <scope>test</scope>
  74.     </dependency>
  75.     <!-- FOR MOCKING IN SPOCK -->
  76.     <dependency>
  77.         <groupId>net.bytebuddy</groupId>
  78.         <artifactId>byte-buddy</artifactId>
  79.         <version>1.9.12</version>
  80.     </dependency>
  81. </dependencies>
  82.  
  83. <build>
  84.     <resources>
  85.         <resource>
  86.             <directory>src/main/resources</directory>
  87.             <includes>
  88.                 <include>dashboard.fxml</include>
  89.                 <include>dashboard.css</include>
  90.             </includes>
  91.             <targetPath>org/monterinio/games/asteroids</targetPath>
  92.         </resource>
  93.     </resources>
  94.  
  95.     <plugins>
  96.         <plugin>
  97.             <groupId>org.apache.maven.plugins</groupId>
  98.             <artifactId>maven-compiler-plugin</artifactId>
  99.             <version>3.8.0</version>
  100.             <configuration>
  101.                 <release>11</release>
  102.             </configuration>
  103.         </plugin>
  104.         <plugin>
  105.             <artifactId>maven-surefire-plugin</artifactId>
  106.             <version>3.0.0-M3</version>
  107.             <configuration>
  108.                 <testSourceDirectory>src/test/groovy</testSourceDirectory>
  109.                 <includes>
  110.                     <include>**/*Spec.java</include>
  111.                     <!-- Yes, .java extension -->
  112.                     <include>**/*Test.java</include>
  113.                     <!-- Just in case having "normal" JUnit tests -->
  114.                 </includes>
  115.                 <argLine>--illegal-access=deny</argLine>
  116.                 <argLine>--add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argLine>
  117.             </configuration>
  118.         </plugin>
  119.  
  120.         <plugin>
  121.             <groupId>org.codehaus.gmavenplus</groupId>
  122.             <artifactId>gmavenplus-plugin</artifactId>
  123.             <version>${gmaven-plugin.version}</version>
  124.             <executions>
  125.                 <execution>
  126.                     <!-- Without joint compilation - no dependencies between Java and Groovy (inheritance)-->
  127.                     <goals>
  128.                         <goal>addTestSources</goal>
  129.                         <goal>testCompile</goal>
  130.                     </goals>
  131.                 </execution>
  132.             </executions>
  133.             <dependencies>
  134.                 <dependency>
  135.                     <groupId>org.codehaus.groovy</groupId>
  136.                     <artifactId>groovy-all</artifactId>
  137.                     <version>${groovy.version}</version>
  138.                     <type>pom</type>
  139.                 </dependency>
  140.             </dependencies>
  141.         </plugin>
  142.  
  143.         <plugin>
  144.             <groupId>org.codehaus.mojo</groupId>
  145.             <artifactId>exec-maven-plugin</artifactId>
  146.             <version>1.6.0</version>
  147.             <executions>
  148.                 <execution>
  149.                     <goals>
  150.                         <goal>java</goal>
  151.                     </goals>
  152.                 </execution>
  153.             </executions>
  154.             <configuration>
  155.                 <mainClass>org.monterinio.games.asteroids.MainAsteroids</mainClass>
  156.             </configuration>
  157.         </plugin>
  158.     </plugins>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top