Skip to content
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.mycompany.playcard;
import java.util.HashSet;
import java.util.Objects;
/**
*
* @author stag
*/
public class jeu52cartes {
private final HashSet <CarteAJouer> jeu;
public jeu52cartes() {
jeu = new HashSet<>();
for (int symbole = 1; symbole <= 4; symbole++) {
for (int hauteur = 0; hauteur < 13; hauteur++) {
jeu.add(new CarteAJouer(hauteur, symbole));
}
}
}
@Override
public int hashCode() {
int hash = 5;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final jeu52cartes other = (jeu52cartes) obj;
return Objects.equals(this.jeu, other.jeu);
}
}