KOSASIH / pi-nexus-autonomous-banking-network

Multiple variables declared on the same line JAVA-C1003
Style
Major
2 occurrences in this check
27
28  public void updatePosition(List<Agent> agents) {
29    // Update the position of the agent based on the positions of the other agents
30    double dx = 0, dy = 0;31    for (Agent other : agents) {
32      if (other != this) {
33        double distance = Math.sqrt(Math.pow(x - other.x, 2) + Math.pow(y - other.y, 2));
18}
19
20class Agent {
21  private double x, y;22
23  public Agent() {
24    x = Math.random() * 100;