Update oneline button

This commit is contained in:
bigJIU 2022-11-15 14:03:57 +08:00
parent 8589fbe5ff
commit 0e38257d2e
3 changed files with 71 additions and 68 deletions

9
.idea/workspace.xml generated
View File

@ -3,11 +3,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c32bfd4e-6189-47f3-9d6c-c1825d3d7e5f" name="Changes" comment=""> <list default="true" id="c32bfd4e-6189-47f3-9d6c-c1825d3d7e5f" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/IDManager.py" beforeDir="false" afterPath="$PROJECT_DIR$/IDManager.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data/annotation.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data/annotation.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data/questionare.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data/questionare.csv" afterDir="false" /> <change beforePath="$PROJECT_DIR$/data/questionare.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data/questionare.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GamePlay.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GamePlay.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameTutorial.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameTutorial.html" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -161,7 +157,8 @@
<workItem from="1667456828218" duration="24361000" /> <workItem from="1667456828218" duration="24361000" />
<workItem from="1667898094682" duration="1595000" /> <workItem from="1667898094682" duration="1595000" />
<workItem from="1667998268807" duration="2593000" /> <workItem from="1667998268807" duration="2593000" />
<workItem from="1668064138807" duration="8356000" /> <workItem from="1668064138807" duration="9019000" />
<workItem from="1668486144158" duration="499000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -181,7 +178,7 @@
</component> </component>
<component name="com.intellij.coverage.CoverageDataManagerImpl"> <component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/MarioWeb$test.coverage" NAME="test Coverage Results" MODIFIED="1668079935841" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/MarioWeb$test.coverage" NAME="test Coverage Results" MODIFIED="1668079935841" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py_.coverage" NAME="Flask (main.py) Coverage Results" MODIFIED="1668088949900" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" /> <SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py_.coverage" NAME="Flask (main.py) Coverage Results" MODIFIED="1668486153745" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
<SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py___1_.coverage" NAME="Flask (main.py) (1) Coverage Results" MODIFIED="1668079945407" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" /> <SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py___1_.coverage" NAME="Flask (main.py) (1) Coverage Results" MODIFIED="1668079945407" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
</component> </component>
</project> </project>

View File

@ -60,3 +60,7 @@ IP,Style,Frequency,Age,Gender
127.0.0.1,,,,, 127.0.0.1,,,,,
127.0.0.1,A,,,, 127.0.0.1,A,,,,
127.0.0.1,,,,, 127.0.0.1,,,,,
127.0.0.1,,,,,
127.0.0.1,,,,,
127.0.0.1,,,,,
127.0.0.1,,,,,

1 IP,Style,Frequency,Age,Gender
60 127.0.0.1,,,,,
61 127.0.0.1,A,,,,
62 127.0.0.1,,,,,
63 127.0.0.1,,,,,
64 127.0.0.1,,,,,
65 127.0.0.1,,,,,
66 127.0.0.1,,,,,

View File

@ -133,70 +133,72 @@
<div align="center" id = "GameWindow"> <div align="center" id = "GameWindow">
</div> </div>
<div align = "center" style="visibility: hidden;" id = "next">
<br>
<button onclick="
window.location.href = window.location.href;
"><h3>Play Next Tutorial</h3></button>
</div>
<div align = "center" style="visibility: hidden;" id = "game">
<br>
<button onclick="
window.location.href = window.location.href+'/data'
"><h3>Play Real Game</h3></button>
</div>
<script>
//Init Cheerpj Framework
cheerpjInit();
/*
function cheerpjCreateDisplay(w, h, oldElem)
{
// Create a div element that will contain all Java Windows
var element = document.createElement("div");
cjDisplay = element;
element.id="cheerpjDisplay";
if(oldElem && w<0 && h<0)
{
// Compute the sizes from the parent
element.style.width="100%";
element.style.height="100%";
}
else
{
element.style.width=w+"px";
element.style.height=h+"px";
}
element.classList.add("cheerpjLoading");
element.classList.add("bordered");
if(oldElem)
oldElem.appendChild(element);
else
document.body.appendChild(element);
cheerpjSetStatus(cjStatus, element);
return element;
}*/
var divElement = document.getElementById("GameWindow");
var level = "t"+"{{tutorial}}";
cheerpjCreateDisplay(500,500,divElement);
cheerpjRunMain("Play", "/app/Mario-AI-Interface.jar", "0", "f_l");
console.log("Cheerpj Initialize Succeed!");
var control = false;
PlayLevel(level,control)
.then(function (){
//play next?
if ("{{next}}"=="1"){
document.getElementById("next").style.visibility = "visible";
}
document.getElementById("game").style.visibility = "visible";
});
</script>
</div> </div>
<div class="col-md-6" align="center" style="visibility: visible;" id = "next">
<br>
<button onclick="
window.location.href = window.location.href;
"><h3>Play Next Tutorial</h3></button>
</div>
<div class="col-md-6" align="center" style="visibility: visible;" id = "game">
<br>
<button onclick="
window.location.href = window.location.href+'/data'
"><h3>Play Real Game</h3></button>
</div>
<script>
//Init Cheerpj Framework
cheerpjInit();
/*
function cheerpjCreateDisplay(w, h, oldElem)
{
// Create a div element that will contain all Java Windows
var element = document.createElement("div");
cjDisplay = element;
element.id="cheerpjDisplay";
if(oldElem && w<0 && h<0)
{
// Compute the sizes from the parent
element.style.width="100%";
element.style.height="100%";
}
else
{
element.style.width=w+"px";
element.style.height=h+"px";
}
element.classList.add("cheerpjLoading");
element.classList.add("bordered");
if(oldElem)
oldElem.appendChild(element);
else
document.body.appendChild(element);
cheerpjSetStatus(cjStatus, element);
return element;
}*/
var divElement = document.getElementById("GameWindow");
var level = "t"+"{{tutorial}}";
cheerpjCreateDisplay(500,500,divElement);
cheerpjRunMain("Play", "/app/Mario-AI-Interface.jar", "0", "f_l");
console.log("Cheerpj Initialize Succeed!");
var control = false;
PlayLevel(level,control)
.then(function (){
//play next?
if ("{{next}}"=="1"){
document.getElementById("next").style.visibility = "visible";
}
document.getElementById("game").style.visibility = "visible";
});
</script>
</div> </div>
<br> <br>