This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,001 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
lobot/src/main/java/io/deeplay/qchess/lobot/ClusterPoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.deeplay.qchess.lobot; | ||
|
||
import java.util.Objects; | ||
|
||
public class ClusterPoint { | ||
|
||
private int value; | ||
private int mark; | ||
|
||
public ClusterPoint(final int value, final int mark) { | ||
setValue(value); | ||
setMark(mark); | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(final int value) { | ||
this.value = value; | ||
} | ||
|
||
public int getMark() { | ||
return mark; | ||
} | ||
|
||
public void setMark(final int mark) { | ||
this.mark = mark; | ||
if (mark < -1) { | ||
this.mark = 0; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final ClusterPoint that = (ClusterPoint) o; | ||
return value == that.value && mark == that.mark; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(value, mark); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "{" + "value=" + value + ", mark=" + mark + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.