Skip to content

Commit

Permalink
Fix java client bug and random winner ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdrz-mirdamadi committed Sep 16, 2022
1 parent b773ee9 commit 1310eca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Clients/Java/main.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public void setInfo() {
int x = scanner.nextInt();
int y = scanner.nextInt();
location = new Point(x, y); // (row, column)
map.grid = new Vector<>();
for (int i = 0; i < map.sightRange * map.sightRange; i++) {
MapTile tile = new MapTile();
tile.type = MapType.values()[scanner.nextInt()];
Expand Down
2 changes: 1 addition & 1 deletion src/process/GameHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def check_finish(self):
self.end_engine = True
self.winner = [1, 'Timeout']
if(self.end_engine):
self.winner[0] = randrange(2)
self.winner[0] += randrange(2)
self.winner[1] += '/random'

def update_info(self):
Expand Down

0 comments on commit 1310eca

Please sign in to comment.