summaryrefslogtreecommitdiffstats
path: root/app.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2011-04-16 12:54:41 -0700
committerPatrick Davison <snapwilliam@gmail.com>2011-04-16 12:54:41 -0700
commit5c76c4160bff16cdd3494736033b427e76d76e73 (patch)
treef4d9c5e45792d62cccfb9336b450aaae610b38ab /app.php
parent6a834c3db575118a20da1276e372a5edf66ac81d (diff)
downloadpathery-5c76c4160bff16cdd3494736033b427e76d76e73.tar.xz
Findtiles function added.
Now used to; locate start locations and teleport out's. Fixes involving the use of randomly placed start locations. Added tile "q" for blank spaces - for use in oddly shaped maps.
Diffstat (limited to 'app.php')
-rw-r--r--app.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/app.php b/app.php
index 5b7a77b..9024184 100644
--- a/app.php
+++ b/app.php
@@ -8,7 +8,49 @@ include "includes/datas.php";
// encode array $json to JSON string
//echo "working...";
+
+if ($_GET['act'] == "submit") {
+header('Content-Type: text/xml');
+echo '<!-- response -->
+<BrainMazeAPI version="0.1">
+ <APIResponse>
+ <SubmitScore result="SUCCESS">
+ <Rank>5</Rank>
+ <SubmittedScore>50</SubmittedScore>
+ <PreviousHighScore>49</PreviousHighScore>
+ </SubmitScore>
+ </APIResponse>
+</BrainMazeAPI>';
+
+}
+
+
+$xml = '<!-- request -->
+<BrainMazeAPI version="0.1">
+ <APIRequest>
+ <SubmitScore>
+ <MapID>5</MapID>
+ <Username>FiftyToo</Username>
+ <Score>50</Score>
+ </SubmitScore>
+ </APIRequest>
+</BrainMazeAPI>
+
+<!-- response -->
+<BrainMazeAPI version="0.1">
+ <APIResponse>
+ <SubmitScore result="SUCCESS">
+ <Rank>5</Rank>
+ <SubmittedScore>50</SubmittedScore>
+ <PreviousHighScore>49</PreviousHighScore>
+ </SubmitScore>
+ </APIResponse>
+</BrainMazeAPI>';
+
+
+
+
if ($_GET['act'] == "getmap") {
$maptype = $_GET['maptype'] + 0;