2024-03-01 22:24:30 +01:00
|
|
|
<div class="cover">
|
2024-03-27 15:51:33 +01:00
|
|
|
<h1 class="title">{{ t 'board.Connecting' }}</h1>
|
2024-03-08 21:35:01 +01:00
|
|
|
<div class="dialog">
|
|
|
|
<h1 id="state"></h1>
|
|
|
|
<h3 id="opponent"></h3>
|
2024-03-27 15:51:33 +01:00
|
|
|
<button onclick="window.location.href = '/'">{{ t 'board.Back to menu' }}</button>
|
2024-03-08 21:35:01 +01:00
|
|
|
</div>
|
2024-03-01 22:24:30 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container" id="gameView">
|
|
|
|
<div>
|
|
|
|
<h1>Statki</h1>
|
|
|
|
<div class="panelContainer">
|
|
|
|
<div class="shapes">
|
|
|
|
<div class="ownBoardInfo">
|
2024-03-27 15:51:33 +01:00
|
|
|
<h3>{{ t 'board.Selected ship' }}</h3>
|
|
|
|
<h2 class="dynamic" id="selectedShip">{{ t 'board.Single-masted' }}</h2>
|
|
|
|
<h3>{{ t 'board.Available:' }} <span class="dynamic danger" id="shipsLeft">-</span></h3>
|
2024-03-01 22:24:30 +01:00
|
|
|
</div>
|
|
|
|
<span class="break"></span>
|
2024-03-25 12:41:02 +01:00
|
|
|
<div class="controls">
|
2024-03-27 15:51:33 +01:00
|
|
|
<h2>{{ t 'board.Controls' }}</h2>
|
|
|
|
<h3 class="controlsOwnBoard"><span class="important">S</span> {{ t 'board.Change ship' }}</h3>
|
|
|
|
<h3 class="controlsOwnBoard"><span class="important">R</span> {{ t 'board.Rotate ship' }}</h3>
|
|
|
|
<h3 class="boardSwitch"><span class="important">B</span> {{ t 'board.Change boards' }}</h3>
|
2024-03-25 12:41:02 +01:00
|
|
|
</div>
|
|
|
|
<div class="mobileControls">
|
2024-03-27 15:51:33 +01:00
|
|
|
<button class="controlsOwnBoard" onclick="switchShips()">{{ t 'board.Change ship' }}</button>
|
|
|
|
<button class="boardSwitch" onclick="switchBoards()">{{ t 'board.Change boards' }}</button>
|
2024-03-25 12:41:02 +01:00
|
|
|
</div>
|
2024-03-01 22:24:30 +01:00
|
|
|
<span class="break"></span>
|
2024-03-02 18:28:33 +01:00
|
|
|
<h3><span class="dynamic" id="whosTurn"></span></h3>
|
2024-03-02 13:56:01 +01:00
|
|
|
<h2 class="important" id="timer">∞</h2>
|
2024-03-01 22:24:30 +01:00
|
|
|
</div>
|
|
|
|
<div class="boardContainer">
|
2024-03-05 21:34:16 +01:00
|
|
|
<div class="board" id="board" oncontextmenu="return false;"></div>
|
|
|
|
<div class="board" id="secondaryBoard" class="secondary" oncontextmenu="return false;"></div>
|
2024-03-01 22:24:30 +01:00
|
|
|
</div>
|
|
|
|
<div class="spaceFiller"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-02 13:56:01 +01:00
|
|
|
</div>
|
|
|
|
|
2024-03-25 12:41:02 +01:00
|
|
|
<div id="mainTippyTemplate" class="tippyTemplate">
|
2024-03-25 17:40:07 +01:00
|
|
|
<button class="tippyBtn" style="background-color: var(--dynamic)" onclick="manualPlace([[FIELDPOS]])"><span class="material-symbols-outlined">place_item</span></button>
|
|
|
|
<button class="tippyBtn" style="background-color: var(--important)" onclick="switchRotation()"><span class="material-symbols-outlined">refresh</span></button>
|
2024-03-25 12:41:02 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="secondaryTippyTemplate" class="tippyTemplate">
|
2024-03-25 17:40:07 +01:00
|
|
|
<button class="tippyBtn" style="background-color: var(--danger)" onclick="manualShoot([[FIELDPOS]])"><span class="material-symbols-outlined">ads_click</span></button>
|
2024-03-25 12:41:02 +01:00
|
|
|
</div>
|
|
|
|
|
2024-03-27 15:51:33 +01:00
|
|
|
<script>
|
|
|
|
window.locale = {
|
|
|
|
"Waiting for the server": "{{ t 'board.Waiting for the server' }}",
|
|
|
|
|
|
|
|
"Reconnecting": "{{ t 'errors.Reconnecting' }}",
|
|
|
|
"Reconnected": "{{ t 'errors.Reconnected' }}",
|
|
|
|
"Reconnection error occured": "{{ t 'errors.Reconnection error occured' }}",
|
|
|
|
"Reconnection failed": "{{ t 'errors.Reconnection failed' }}",
|
|
|
|
"Disconnected": "{{ t 'errors.Disconnected' }}",
|
|
|
|
"Try to refresh the page if this error reoccurs": "{{ t 'errors.Try to refresh the page if this error reoccurs' }}",
|
|
|
|
"Connection error": "{{ t 'errors.Connection error' }}",
|
|
|
|
|
|
|
|
"Single-masted": "{{ t 'board.Single-masted' }}",
|
|
|
|
"Two-masted": "{{ t 'board.Two-masted' }}",
|
|
|
|
"Three-masted": "{{ t 'board.Three-masted' }}",
|
|
|
|
"Four-masted": "{{ t 'board.Four-masted' }}",
|
|
|
|
|
|
|
|
"Preparation phase": "{{ t 'board.Preparation phase' }}",
|
|
|
|
"Your turn": "{{ t 'board.Your turn' }}",
|
|
|
|
"Opponents turn": "{{ t 'board.Opponents turn' }}",
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2024-03-02 13:56:01 +01:00
|
|
|
<script src="/assets/js/battleships-lib.js"></script>
|
|
|
|
<script src="/assets/js/main.js"></script>
|
|
|
|
<script src="/assets/js/key-handling.js"></script>
|
2024-03-08 19:18:53 +01:00
|
|
|
<script src="/assets/js/socket-game.js"></script>
|
|
|
|
<script src="/assets/js/socket-err-handler.js"></script>
|