소스 검색

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

TurnDemo class not really necessary but illustrative
rdh-local-prototype-endturn
Rob Hallam 9 달 전
부모
커밋
b6b270e9c2
2개의 변경된 파일23개의 추가작업 그리고 1개의 파일을 삭제
  1. +18
    -0
      app/demo/TurnDemo.java
  2. +5
    -1
      app/events/Initalize.java

+ 18
- 0
app/demo/TurnDemo.java 파일 보기

@@ -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 파일 보기

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


불러오는 중...
취소
저장