Skip to content

Instantly share code, notes, and snippets.

@Paul-cbt
Last active November 14, 2021 18:01
Show Gist options
  • Save Paul-cbt/df59c1ff943b92f4c5bf5de334e16e5a to your computer and use it in GitHub Desktop.
Save Paul-cbt/df59c1ff943b92f4c5bf5de334e16e5a to your computer and use it in GitHub Desktop.
class Resultat {
int numberOfDormir;
int numberOfMangeoire;
int numberOfRoue;
//à ajouter
Resultat add(Resultat currentResult) {
return Resultat(
numberOfDormir: numberOfDormir + currentResult.numberOfDormir,
numberOfMangeoire: numberOfMangeoire + currentResult.numberOfMangeoire,
numberOfRoue: numberOfRoue + currentResult.numberOfRoue);
}
Resultat({
required this.numberOfDormir,
required this.numberOfMangeoire,
required this.numberOfRoue,
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment