Merge branch 'main' of codeberg.org:adrien-lsh/ft_transcendence

This commit is contained in:
Namonay
2024-05-15 14:01:04 +02:00
13 changed files with 38 additions and 37 deletions

View File

@ -280,8 +280,8 @@ class Game {
PADDLESPEED: 3,
BALLRADIUS: 5,
BALLSPEED: 2,
BALLMAXSPEED: 4,
BALLSPEEDINCR: 0.15,
BALLMAXSPEED: 10,
BALLSPEEDINCR: 0.2,
MAXBOUNCEANGLE: 10 * (Math.PI / 12),
MAXSCORE: 2
};

View File

@ -71,6 +71,7 @@ export default class PongOnlineView extends AbstractAuthenticatedView
myPlayer.score,
myPlayer.rail,
myPlayer.position,
myPlayer.isEliminated
);
myPlayer = this.myPlayer;
@ -87,7 +88,6 @@ export default class PongOnlineView extends AbstractAuthenticatedView
keyPressHandler(event)
{
console.log("bozo")
if (!this.keysPressed.includes(event.key))
this.keysPressed.push(event.key);
}

View File

@ -31,11 +31,6 @@ export default class extends AbstractView {
this.profiles.filter(user => user.username.toLowerCase().startsWith(search) == true).forEach(async (user) => {
if (user.id == null) {
console.log("list User one with id null;");
return;
}
const new_user = document.createElement("li");
// username
@ -46,7 +41,7 @@ export default class extends AbstractView {
if (this.logged && user.id == client.me.id)
username.style.color = "green";
else {
const online = user.online;
let online = (await client.profiles.getProfile(user.username)).online;
if (online == undefined)
username.style.color = "gray";
else if (online == true)