-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
152 lines (132 loc) · 4.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ThoughtWorks - Educod@r</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<link href="style.css" rel="stylesheet" />
<link href="toastr.min.css" rel="stylesheet"/>
<!--Library-->
<script src="scripts/lib/jquery-1.11.3.min.js"></script>
<script src="scripts/lib/underscore.js"></script>
<script src="scripts/lib/preloadjs-0.6.1.min.js"></script>
<script src="scripts/lib/toastr.min.js"></script>
<!--Engine-->
<script src="scripts/engine/evento.js"></script>
<script src="scripts/engine/input.js"></script>
<script src="scripts/engine/scene.js"></script>
<script src="scripts/engine/scene_controle.js"></script>
<script src="scripts/engine/sceneHTML.js"></script>
<script src="scripts/engine/stage.js"></script>
<script src="scripts/engine/utils.js"></script>
<script src="scripts/engine/state.js"></script>
<script src="scripts/engine/stateMachine.js"></script>
<script src="scripts/engine/spriteData.js"></script>
<script src="scripts/engine/spritesheet.js"></script>
<!--Jogo-->
<script src="scripts/app.js"></script>
<script src="scripts/commandInterface.js"></script>
<!--Telas-->
<script src="scripts/scenes/scene_main.js"></script>
<script src="scripts/scenes/grid.js"></script>
<script src="scripts/scenes/sprite_data.js"></script>
<script src="scripts/scenes/state_player_idle.js"></script>
<script src="scripts/scenes/state_player_moving.js"></script>
<script src="scripts/scenes/player.js"></script>
<script src="scripts/scenes/treasure.js"></script>
<script>
$(document).ready(function () {
function releaseCodeEditor() {
$("#txtCommand").prop("disabled", false);
$("#btnRun").prop("disabled", false);
};
App.loadImages();
App.callbackEndExecution = releaseCodeEditor;
App.display = {};
App.display.canvas = $("#canvas");
App.display.ctx = App.display.canvas[0].getContext("2d");
App.display.width = canvas.width;
App.display.height = canvas.height;
App.mouse = utils.captureMouse(App.display.canvas[0]);
$( "#btnRun" ).click(function() {
App.scene_controle.reiniciarScene();
var commands = $('#txtCommand').val().split('\n');
if(commands.length > 0) {
$("#btnRun").prop("disabled", true);
$("#txtCommand").prop("disabled", true);
App.CommandInterface.execute(commands);
}
});
});
</script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6">
<img src="images/Logo.png">
</div>
<div class="description">
<h3>Passeie pelas nuvens em busca de balões.</h3>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div id="commandArea">
<textarea id='txtCommand' placeholder="Escreva seu código aqui..." rows="25" cols="60"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<div id="gameArea">
<canvas id="canvas" width="600" height="400"></canvas>
</div>
<div class="action-buttons-wrapper">
<button id="btnRun" type="button" class="btn btn-success">
Executar
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
<div class="row command-list">
<h4>Lista de Comandos:</h4>
<b>andar(x)</b> - Anda X espaços no tabuleiro.</br>
<b>girarParaDireita()</b> - Faz o avião girar para a direita.</br>
<b>girarParaEsquerda()</b> - Faz o avião girar para a esquerda.</br>
<b>checarTesouro()</b> - Verifica se há um tesouro na casa a frente.</br>
</br>
<h4>Lista de Funções (Sequências de Comandos):</h4>
<b>meiaVolta()</b> {
<p></p>
<p>girarParaDireita()</p>
<p>girarParaDireita()</p>
}
</br>
<b>andarEChecarTesouro(x)</b> {
<p></p>
<p> andar(x) </p>
<p>checarTesouro()</p>
}
</br>
<b>andarChecandoTesouro(x)</b> {
<p></p>
<p>andar(1)</p>
<p>checarTesouro()</p>
<p>...</p>
<p>andar(1)</p>
<p>checarTesouro()</p>
}
</br>
</div>
</div>
</div>
</div>
</body>
</html>