Browse Source

feat: identify this is running the 'end turn' demo

TurnDemo class not really necessary but illustrative
rdh-local-prototype-endturn
Rob Hallam 9 months ago
parent
commit
b6b270e9c2
2 changed files with 23 additions and 1 deletions
  1. +18
    -0
      app/demo/TurnDemo.java
  2. +5
    -1
      app/events/Initalize.java

+ 18
- 0
app/demo/TurnDemo.java View File

@@ -0,0 +1,18 @@
package demo;

import commands.BasicCommands;

import akka.actor.ActorRef;

public class TurnDemo {
/**
* This method is used to demonstrate the use of the endTurnClicked event.
*
* @param out
*/
public static void executeDemo(ActorRef out) {
// addPlayer1Notification
BasicCommands.addPlayer1Notification(out, "Turn Demo", 2);
try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();}
}
}

+ 5
- 1
app/events/Initalize.java View File

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode;
import akka.actor.ActorRef;
import demo.CommandDemo;
import demo.TurnDemo;
import demo.Loaders_2024_Check;
import structures.GameState;
@@ -29,8 +30,11 @@ public class Initalize implements EventProcessor{
gameState.something = true;
// User 1 makes a change
CommandDemo.executeDemo(out); // this executes the command demo, comment out this when implementing your solution
//CommandDemo.executeDemo(out); // this executes the command demo, comment out this when implementing your solution
//Loaders_2024_Check.test(out);
// start the turn demo
TurnDemo.executeDemo(out);
}
}


Loading…
Cancel
Save