Visual illustration of the code challenge: Rolland-Garros

Rolland-Garros

Un affrontement entre 2 joueurs d’anthologie… Qui en sortira vainqueur ?

Coding in the sandbox You must be logged in to access the sandbox.

Mission

Tu es dans les tribunes du court central… Tu regardes le match tranquillement entre N. et D. Mais la pluie interrompt le match. Tu te souviens des coups, mais plus du score…

Règles

Une donnée disponible :

points : une chaîne de caractères contenant chaque coup gagné par les 2 joueurs. Si c’est « D », c’est que le joueur « D » a gagné le point. « N » sinon.

Au tennis, on compte de la façon suivante : 0 – 15 – 30 – 40 – Jeu ! Pour faciliter ce challenge, on ne tiendra pas compte des possibles égalités et avantage. Si un joueur a 40 et marque encore un point, il remporte le jeu. A la fin d’un jeu, chaque joueur repart à 0-0.

Un SET se gagne avec 6 jeux. Une fois qu’un joueur a gagné un SET, on retombe à 0-0 dans le SET suivant. De la même façon, on ne prendra pas en compte la règle des 2 jeux d’écart.

Tu dois retourner le score une fois le dernier coup joué. Le format attendu est :

JeuxJoueurD:jeuxJoueurN:pointsJoueurD:pointsJoueurN

Par exemple : 5:3:15:30

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- Want to work in your favorite editor? Organize your code well, test, check out our API documentation.
- You can also copy/paste a dataset below.

challenge code for resolution via API: TENNIS_1

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.

Dataset and algorithmic logic

Based on the data and the expected response, use the process to determine the logic to implement.

Show data and progress

Methodologies

Develop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.

No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!


Corrections

The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)

No answer yet for this challenge, but we&'re working on it! Follow us to be informed of the release!

Programming concept(s) that can be used to solve this challenge: Tableaux, Programmation Orientée Objet, Booléens, Fonctions, Parsing

Keep coding

Other challenges to complete

Beginner
Bienvenue à AlgoPark !

Bienvenue à AlgoPark !

Tu pars à l’assaut de tous les algorithmes qui font fonctionner ce parc d’attractions !

Behavioral
Advance
Petits monstres mignons #2

Petits monstres mignons #2

On poursuit l’étude de ces mignons petits monstres !

Behavioral
Beginner
Avengers

Avengers

Aide les Avengers à battre Thanos ! Mais combien de fois devras-tu essayer ?

Behavioral Corrigé disponible : Javascript