File Parser for levels (#18)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Debucquoy Anthony (tonitch) <debucquoy.anthony@gmail.com> Reviewed-on: #18 Reviewed-by: Mat_02 <diletomatteo@gmail.com>
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
package school_project;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* This is used to represent a position/vector/... any ensemble of 2 elements that have to work together in
|
||||
* a plan. This way we can use some basic operations over them.
|
||||
*/
|
||||
public class Vec2 {
|
||||
public class Vec2 implements Serializable {
|
||||
public int x, y;
|
||||
|
||||
public Vec2() {
|
||||
@ -16,4 +18,12 @@ public class Vec2 {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Vec2 vec) {
|
||||
return this.x == vec.x && this.y == vec.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user