Skip to content

Commit 3b9df18

Browse files
committed
Added absorption
1 parent 6c389eb commit 3b9df18

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

server/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<contextPath>/agario</contextPath>
4343
</webApp>
4444
<httpConnector>
45-
<port>1337</port>
45+
<port>8080</port>
4646
</httpConnector>
4747
</configuration>
4848
</plugin>

server/src/main/java/men/brakh/agario/GameEndpoint.java

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class GameEndpoint {
2525

2626
@OnOpen
2727
public void onOpen(Session session, @PathParam("username") String username) {
28+
logger.info("New connection: " +username);
2829
communicator = new SessionCommunicator(session);
2930
gameField.add(username, communicator);
3031
}

server/src/main/java/men/brakh/agario/model/game/Person.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public boolean isIntersect(Person person) {
5959

6060
int sr= r1 + r2;
6161

62-
return d<=sr;
62+
return d<=sr/2;
6363
}
6464

6565
public void changeCenter(Point center) {

server/src/main/resources/game.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ spawn.size = 20
22
spawn.colors = #FF0000,#FFFF00,#45161C,#008000,#0000FF,#000000
33

44
speed.max = 5
5-
speed.delay = 60
5+
speed.delay = 0
66

77
field.width = 2000
88
field.height = 2000

0 commit comments

Comments
 (0)