Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft : Capture the flag #44

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from
Open

Draft : Capture the flag #44

wants to merge 25 commits into from

Conversation

orwenn22
Copy link

No description provided.

@Niilyx Niilyx assigned Niilyx and orwenn22 and unassigned Niilyx Sep 12, 2023
@JiveOff
Copy link
Member

JiveOff commented Sep 14, 2023

Hésite pas à ajouter une cartouche en haut de tes classes pour expliquer l"utilité de chaque classe et indiquer ton nom + prénom pour être présenté en qualité d'auteur.

(+ plus besoins de poser le drapeau pour marquer des points)
(+ messages globaux)
}
}

public String getTeamColorCode(String teamName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normalement, tu peux récupérer la couleur d'une team avec le getTeam du Team manager.

Aussi, tu peux renommer les teams en "Rouge" et "Bleu" si tu le souhaites.

@JiveOff JiveOff self-requested a review December 9, 2023 17:45
@orwenn22 orwenn22 marked this pull request as ready for review December 14, 2023 19:56
Copy link
Member

@JiveOff JiveOff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Petite review rapide que je fais sur tel, donc j'ai peut-être raté des trucs, notamment le formatage

private static final double BASE_RADIUS = 4;


public GameLogic(LudosGame ludosGame1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu peux utiliser une classe record pour ne pas avoir de constructeur comme ça

* @param red_location position initiale du drapeau rouge
* @param blue_location position initiale du drapeau bleu
*/
public void initFlags(Location red_location, Location blue_location) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Généralement, on essaye de privilégier un seul casing pour les arguments de méthodes, il faut donc éviter le snake case occasionnel.


Material helmetSlotMaterial = helmetItem.getType();
player.entity().getInventory().clear(39); //39 = slot helmet
player.entity().getInventory().clear(1); // 1 = deuxième slot hotbar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attention aux clear dans les slots quand les joueurs peuvent manipuler leur inventaire.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nbt sur items

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Au final j'ai pas fait avec les nbt, j'utilise juste inventory.remove pour retirer les drapeaux

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je sais pas si c'est une bonne idée de faire ce que tu as fait avec le slot du helmet mais bon, ça devrait être bon.

}

public void setWorld(World world1) {
world = world1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je préfère que tu utilise un game point pour déterminer le monde de jeu

@Override
public void beginGame() {
super.beginGame();
GameTimer gt = new GameTimer(gameLogic::spawnParticles, -1, 10);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'aurais bien vu les routines de particules dans une classe séparée avec une méthode d'initialisation des timers

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je viens de le faire mais je suis vraiment pas sûr de si c'est vraiment ce que tu voulais

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est good


@Override
public void postMapParse() {
Map<String, ArrayList<GamePoint>> game_points = Core.get().getMapManager().getCurrentMap().getGamePoints();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pas de snake case

@JiveOff JiveOff self-requested a review December 15, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants