diff --git a/gauss-turing/game/static/-.png b/gauss-turing/game/static/-.png index 493483d..1bb101b 100644 Binary files a/gauss-turing/game/static/-.png and b/gauss-turing/game/static/-.png differ diff --git a/gauss-turing/game/static/P0.png b/gauss-turing/game/static/P0.png index 62536c9..aa6f6c8 100644 Binary files a/gauss-turing/game/static/P0.png and b/gauss-turing/game/static/P0.png differ diff --git a/gauss-turing/game/static/forward.png b/gauss-turing/game/static/forward.png index 101422c..b31fe11 100644 Binary files a/gauss-turing/game/static/forward.png and b/gauss-turing/game/static/forward.png differ diff --git a/gauss-turing/game/static/left.png b/gauss-turing/game/static/left.png index 66ef652..934e631 100644 Binary files a/gauss-turing/game/static/left.png and b/gauss-turing/game/static/left.png differ diff --git a/gauss-turing/game/static/right.png b/gauss-turing/game/static/right.png index 8ade14b..4c5bbe5 100644 Binary files a/gauss-turing/game/static/right.png and b/gauss-turing/game/static/right.png differ diff --git a/gauss-turing/game/static/style.css b/gauss-turing/game/static/style.css index e597446..c3e95a2 100644 --- a/gauss-turing/game/static/style.css +++ b/gauss-turing/game/static/style.css @@ -1,6 +1,14 @@ -.main-canvas { - outline: 1px solid #dddddd;; - width: 500px; +.cmd-canvas { + outline: 3px solid #dddddd;; + width: 430px; + height: 120px; + margin: 50px auto 0; + position: relative; +} + +.programmer-canvas { + outline: 3px solid #dddddd;; + width: 338px; height: 220px; margin: 50px auto 0; position: relative; @@ -20,86 +28,34 @@ position: absolute !important; top: 100px; font-size: 15px; - color: #ffffff; + color: #000000; line-height: 25px; text-align: center; cursor: move; } -.robotOrientation { - width: 75px; - height: 75px; -} - -.robotOrientation90 { - width: 75px; - height: 75px; - -webkit-transform: rotate(90deg); - -moz-transform: rotate(90deg); - -o-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} - -.robotOrientation180 { - width: 75px; - height: 75px; - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.robotOrientation270 { - width: 75px; - height: 75px; - -webkit-transform: rotate(270deg); - -moz-transform: rotate(270deg); - -o-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} - -.rotate90 { - width: 100px; - height: 100px; - -webkit-transform: rotate(90deg); - -moz-transform: rotate(90deg); - -o-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} - -.rotate180 { - -webkit-transform: rotate(180deg); - -moz-transform: rotate(180deg); - -o-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} - -.rotate270 { - -webkit-transform: rotate(270deg); - -moz-transform: rotate(270deg); - -o-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} - .top-buffer { margin-top:20px; } +.center { + margin: 20px; + position: absolute; + left: 50%; + -ms-transform: translateX(-50%, -50%); + transform: translateX(-50%, -50%); +} -.card0 { left: 0; top: 0; background-color: #E74C3C; position: absolute !important; -} -.card1 { left: 100px; top: 0; background-color: #8E44AD; position: absolute !important; -} -.card2 { left: 200px; top: 0; background-color: #5DADE2; } -.card3 { left: 300px; top: 0; background-color: #1ABC9C; } -.card4 { left: 400px; top: 0; background-color: #F1C40F; } -.card5 { left: 50px; top: 120px; background-color: #F39C12; } -.card6 { left: 150px; top: 120px; background-color: #34495E; } -.card7 { left: 250px; top: 120px; background-color: #FF00FF; } -.card8 { left: 350px; top: 120px; background-color: #008080; } +.cmd0 { left: 0; top: 0; background-color: #E74C3C; position: absolute !important;} +.cmd1 { left: 92px; top: 0; background-color: #8E44AD; position: absolute !important;} +.cmd2 { left: 184px; top: 0; background-color: #5DADE2; } +.cmd3 { left: 276px; top: 0; background-color: #1ABC9C; } +.cmd4 { left: 368px; top: 0; background-color: #F1C40F; } + +.programmer_cmd0 { left: 0; top: 0; background-color: #E74C3C; position: absolute !important;} +.programmer_cmd1 { left: 92px; top: 0; background-color: #8E44AD; position: absolute !important;} +.programmer_cmd2 { left: 184px; top: 0; background-color: #5DADE2; } +.programmer_cmd3 { left: 276px; top: 0; background-color: #1ABC9C; } +.programmer_cmd4 { left: 38px; top: 120px; background-color: #F1C40F; } +.programmer_cmd5 { left: 138px; top: 120px; background-color: #F39C12; } +.programmer_cmd6 { right: 38px; top: 120px; background-color: #34495E; } .card_hidden { background-color: #dddddd; } \ No newline at end of file diff --git a/gauss-turing/game/templates/drag_example.html b/gauss-turing/game/templates/drag_example.html index 0b4d623..fd29d7c 100644 --- a/gauss-turing/game/templates/drag_example.html +++ b/gauss-turing/game/templates/drag_example.html @@ -3,7 +3,7 @@ - Drag + imaginaerraum.de @@ -20,9 +20,9 @@
Aktuelles Programm: -
+
{% for cmd in current_program %} -
{{ loop.index0 }} @@ -34,9 +34,10 @@
Mögliche Befehle: -
+
{% for cmd in valid_commands %} -
@@ -44,75 +45,7 @@
- -
+
@@ -120,10 +53,6 @@
- -
- Viel Spaß beim Spielen! -
@@ -133,40 +62,12 @@ var please_wait = $(".notification").hide(); var box = $(".box"); - var mainCanvas = $(".main-canvas"); - - var orientation_icon = $("#orientation"); - var orientation_input = $("#inputRobotOrientation"); bootstrap_alert = function() {}; bootstrap_alert.warning = function(message) { $('#alert_placeholder').html('
×'+message+'
') }; - orientation_icon.click(function () { - if (this.alt === "0") { - this.alt = "90"; - $("#inputRobotOrientation").val("v"); - //document.getElementById("inputRobotOrientation").value = "v"; - } - else if (this.alt === "90") { - this.alt = "180"; - $("#inputRobotOrientation").val("<"); - //document.getElementById("inputRobotOrientation").value = "<"; - } - else if (this.alt === "180") { - this.alt = "270"; - $("#inputRobotOrientation").val("^"); - //document.getElementById("inputRobotOrientation").value = "^"; - } - else if (this.alt === "270") { - this.alt = "0"; - $("#inputRobotOrientation").val(">"); - //document.getElementById("inputRobotOrientation").value = ">"; - } - $(this).css({'transform' : 'rotate('+ this.alt +'deg)'}); - }); - $("#btnSubmit").click(function () { //alert("button"); @@ -198,58 +99,6 @@ }); - /* - box.draggable({ - containment: mainCanvas, - helper: "clone", - - start: function () { - $(this).css({ - opacity: 0 - }); - - $(".box").css("z-index", "0"); - }, - - stop: function () { - $(this).css({ - opacity: 1 - }); - } - }); - - box.droppable({ - accept: box, - - drop: function (event, ui) { - var draggable = ui.draggable; - var droppable = $(this); - var dragPos = draggable.position(); - var dropPos = droppable.position(); - - var cmds = [ui.draggable.attr('name').toString(), $(this).attr('name')] - - //console.log(dragPos); - //console.log(dropPos); - - //console.log($(cmds)); - // notify server that cards have been swapped - $.post(url='/', {drag: ui.draggable.attr('name'), drop: $(this).attr('name')}); - - draggable.css({ - left: dropPos.left + "px", - top: dropPos.top + "px", - "z-index": 20 - }); - - droppable.css("z-index", 10).animate({ - left: dragPos.left, - top: dragPos.top - }); - } - }); - */ - var edited_command = null; box.click(function () {