diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2011-04-16 12:54:41 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2011-04-16 12:54:41 -0700 |
commit | 5c76c4160bff16cdd3494736033b427e76d76e73 (patch) | |
tree | f4d9c5e45792d62cccfb9336b450aaae610b38ab /app.php | |
parent | 6a834c3db575118a20da1276e372a5edf66ac81d (diff) | |
download | pathery-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.php | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -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;
|