턴 수행 constraint를 상세하게 분리, argTest 추가. 턴 커맨드 실행용 클래스, ajax 파일 준비
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::requireGameLogin([])->setReadOnly();
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
$commandList = [];
|
||||
|
||||
$generalID = $session->generalID;
|
||||
|
||||
$rawTurn = $db->queryAllLists('SELECT turn_idx, action, arg FROM general_turn WHERE general_id = %i ORDER BY turn_idx ASC');
|
||||
foreach($rawTurn as [$turn_idx, $action, $arg]){
|
||||
$commandList[$turn_idx] = [
|
||||
'action'=>$action,
|
||||
'arg'=>Json::decode($arg)
|
||||
];
|
||||
}
|
||||
|
||||
Json::die($commandList);
|
||||
Reference in New Issue
Block a user