Pour se familiariser avec le système, tu dois battre ton adversaire à Pierre / Feuille / Ciseaux et donc répondre à chacun de ses coups ! Tu as une longueur d’avance et sait donc ce qu’il va jouer, à toi de répondre en fonction !
Le système renvoie la liste des coups de ton adversaire sous la forme d’une chaîne de caractères.
Ici, on ne rigole pas, ce n’est pas le premier à 3 qui gagne, il faut gagner tous les coups !
Si ton adversaire fait Pierre, tu dois faire Feuille, s’il fait Feuille, tu dois faire Ciseaux, s’il fait Ciseaux, tu dois faire Pierre !
Chaque coup est représenté par une lettre :
Par exemple, le système va renvoyer PFCP. 4 coups donc : Pierre, Feuille, Ciseaux, Pierre, il faudra donc retourner FCPF.
challenge code for resolution via API: PIERRE_FEUILLE_CISEAUX
Some resources to help you:
Data and algorithmic logic Methodologies Corrections
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 progressDevelop 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!
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 ;)
Programming concept(s) that can be used to solve this challenge: Conditions
Other challenges to complete