-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (38 loc) · 2.02 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Collision Avoidance Game</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<h1 style="text-align: center;">Collision Avoidance Game</h1>
<div id="scenarioSetup" style="text-align: center;">
<h2>Scenario Setup</h2>
<label for="terrain">Terrain Complexity: <span id="terrainLabel">Easy</span></label>
<input type="range" id="terrain" min="1" max="5" value="1" oninput="updateLabel('terrain', this.value, ['Easy', 'Moderate', 'Challenging', 'Hard', 'Very Hard'])">
<br>
<label for="vessels">Number of Vessels: <span id="vesselsLabel">1</span></label>
<input type="range" id="vessels" min="1" max="10" value="1" oninput="updateLabel('vessels', this.value, Array.from({length: 10}, (_, i) => i + 1))">
<br>
<label for="visibility">Visibility: <span id="visibilityLabel">Clear</span></label>
<input type="range" id="visibility" min="1" max="5" value="5" oninput="updateLabel('visibility', this.value, ['Clear', 'Hazy', 'Moderate Fog', 'Dense Fog', 'No Visibility'])">
<br>
<label for="timeOfDay">Time of Day: <span id="timeOfDayLabel">Day</span></label>
<input type="range" id="timeOfDay" min="1" max="2" value="1" oninput="updateLabel('timeOfDay', this.value, ['Day', 'Night'])">
<br>
<label for="weather">Weather Conditions: <span id="weatherLabel">Calm</span></label>
<input type="range" id="weather" min="1" max="5" value="1" oninput="updateLabel('weather', this.value, ['Calm', 'Breezy', 'Choppy', 'Rough', 'Stormy'])">
<br><br>
<button onclick="generateScenario()">Start Scenario</button>
</div>
<canvas id="gameCanvas" width="800" height="600" style="display: none;"></canvas>
<div id="scenarioDescription" style="text-align: center; display: none;">
<h3>Your Scenario:</h3>
<p id="scenarioText"></p>
<button onclick="startGame()">Start Game</button>
</div>
<script src="js/game.js"></script>
</body>
</html>