/
Hipahopa808
/
Simulation
Обзор
Документация
Войти
/
Hipahopa808
/
Simulation
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/map/Coordinates.java
34 строки
693 B
Hipahopa808
Add simple realization
27 апр 2026, 13:53
27 апр 2026, 13:53
a714300
Код
Авторство
О чём код?
package map; import java.util.Objects; public class Coordinates { private int row; private int col; public Coordinates(int row, int col) throws IllegalArgumentException { this.row = row; this.col = col; } public int getRow() { return row; } public int getCol() { return col; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Coordinates that = (Coordinates) o; return row == that.row && col == that.col; } @Override public int hashCode() { return Objects.hash(row, col); } }