/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package database;

import java.io.Serializable;


/**
 *
 * @author Ani
 */
public class UserGame implements Serializable{
    private String code;
    private Integer heuristic;

    public UserGame() {
    }

    public UserGame(String code, Integer heuristic) {
        this.code = code;
        this.heuristic = heuristic;
    }

    public String getCode() {
        return code;
    }

    public Integer getHeuristic() {
        return heuristic;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setHeuristic(Integer heuristic) {
        this.heuristic = heuristic;
    }

    @Override
    public String toString() {
        return code + " " + heuristic;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof UserGame)){
            return false;
        }
        UserGame ug = (UserGame) obj;
        return ug.getCode().equals(this.getCode());
    }






}
