Procházet zdrojové kódy

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

TurnDemo class not really necessary but illustrative
rdh-local-prototype-endturn
Rob Hallam před 9 měsíci
rodič
revize
b6b270e9c2
2 změnil soubory, kde provedl 23 přidání a 1 odebrání
  1. +18
    -0
      app/demo/TurnDemo.java
  2. +5
    -1
      app/events/Initalize.java

+ 18
- 0
app/demo/TurnDemo.java Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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);
}
}


Načítá se…
Zrušit
Uložit