Skip to content

Instantly share code, notes, and snippets.

@olygood
Created February 6, 2021 19:14
Show Gist options
  • Save olygood/13d58c670d0ac23e738563b07ca23e58 to your computer and use it in GitHub Desktop.
Save olygood/13d58c670d0ac23e738563b07ca23e58 to your computer and use it in GitHub Desktop.
tableaux poker
let a = 4;
let b = 3;
let c = 2;
let d = 1;
let e = 0;
let f = 10;
let g = 0;
let h = 0;
let i = 6;
let j = 0;
let k = 8;
const gamers = [a,b,c,d,e,f,g,h,i,j,k];
console.log(gamers);
let trier = gamers.sort(function(nb1,nb2){return nb2-nb1})
console.log(trier);
// couper les quatres premier avec slice
console.log(gamers === trier);
let lesQautresMeilleurs = trier.slice(0,4);
console.log(lesQautresMeilleurs);
class joeursDePoker {
constructor(name,nbDePointDeDepart){
this.name= name,
this.point= nbDePointDeDepart
}
saluerName(){
console.log('bien venu à toi : ')
}
}
let oli = new joeursDePoker('oli',0);
console.log(oli);
let mitch = new joeursDePoker('mitch',0);
console.log(mitch);
let manu = new joeursDePoker('manu',0);
console.log(manu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment