diff --git a/data/players.json b/data/players.json new file mode 100644 index 0000000..7130665 --- /dev/null +++ b/data/players.json @@ -0,0 +1,19 @@ +{ + "players" : [ + { + "name": "Ali", + "color": "blue", + "permissions": ["mod", "dev", "op"] + }, + { + "name": "Byz", + "color": "grey", + "permissions": ["builder"] + }, + { + "name": "iie", + "color": "red", + "permissions" : ["admin", "mod", "dev", "op"] + } + ] +} diff --git a/index.html b/index.html index a12c916..5d21d30 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,15 @@ - + + Chromagaming Civilization Screen +

The Civilization Screen

-

Welcome to the civlization screen.

-
-

Map

-

Login

+

Welcome to the civilization screen.

diff --git a/sandbox.html b/sandbox.html new file mode 100644 index 0000000..e706fa8 --- /dev/null +++ b/sandbox.html @@ -0,0 +1,17 @@ + + + + + Developer's Sandbox + + + + +

Developer's Sandbox

+ + diff --git a/sandbox/helloajax.js b/sandbox/helloajax.js new file mode 100644 index 0000000..baf8de7 --- /dev/null +++ b/sandbox/helloajax.js @@ -0,0 +1,35 @@ +/* AJAX Tutorial, By The Net Ninja +https://www.youtube.com/watch?v=h0ZUpPiV1ac +*/ + +window.onload = function(){ + + let http = new XMLHttpRequest(); + + http.onreadystatechange = function(){ + const finalState = 4; + const idealStatus = 200; + + if(http.readyState == finalState && http.status == idealStatus){ + console.log(JSON.parse(http.response)); + } + + } + + const method = "GET"; + const filepath = "data/players.json"; + const isASYNC = true; + http.open(method, filepath, isASYNC); + http.send(); + +} + +/* READY STATES + +0 - Request not initialized +1 - Request has been set up +2 - Request has been sent +3 - Request is in process +4 - Request is complete + +*/