Turns and rounds mode
All checks were successful
gitea/minesweeper-frontend/pipeline/head This commit looks good
All checks were successful
gitea/minesweeper-frontend/pipeline/head This commit looks good
This commit is contained in:
parent
258cc851dc
commit
9e20fe6829
@ -21,6 +21,7 @@ const RoomInfo = ({ room, handleDisconnect }) => {
|
||||
room.players.map((user, idx) =>
|
||||
<li key={idx}>
|
||||
<span className="player-color-indicator" style={{ backgroundColor: user.color }}></span>
|
||||
{user.socketId === room.currentPlayer ? <span> →</span> : <></>}
|
||||
{user.tombstone ? <span>💀</span> : <></>}
|
||||
<span>{user.name}</span>
|
||||
{user.confirmedSelection ? <span>✅</span> : <></>}
|
||||
|
||||
@ -102,7 +102,8 @@ const RoomCreate = ({ handleCreateRoom }) => {
|
||||
</div>
|
||||
<div>
|
||||
<button disabled={gameMode === "realtime"} onClick={() => setGameMode("realtime")}>Realtime</button>
|
||||
<button disabled={gameMode === "turns"} onClick={() => setGameMode("turns")}>Turn based</button>
|
||||
<button disabled={gameMode === "turns"} onClick={() => setGameMode("turns")}>Turns</button>
|
||||
<button disabled={gameMode === "rounds"} onClick={() => setGameMode("rounds")}>Rounds</button>
|
||||
</div>
|
||||
</div>
|
||||
<button onClick={createRoom}>Create Room</button>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { io } from 'socket.io-client';
|
||||
|
||||
const URL = 'http://192.168.0.100:5174';
|
||||
const URL = 'http://192.168.0.134:5174';
|
||||
console.log('Backend URL', URL);
|
||||
export const socket = io(URL, {
|
||||
autoConnect: false,
|
||||
transports: ['websocket'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user