Skip to content

Commit 3cf7d98

Browse files
authored
Merge pull request #56 from emptybutton/stable
Pull 0.4.2
2 parents b5b4953 + 7122361 commit 3cf7d98

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ttt"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
description = "Tic-Tac-Toe Telegram Bot"
55
authors = [
66
{name = "Alexander Smolin", email = "[email protected]"}

src/ttt/entities/core/matchmaking_queue/matchmaking_queue.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ def _is_game_allowed(
7979
user_waiting1: UserWaiting,
8080
user_waiting2: UserWaiting,
8181
) -> bool:
82-
return are_ranks_adjacent(
83-
user_waiting1.user.rank(), user_waiting2.user.rank(),
84-
)
82+
rank1 = user_waiting1.user.rank()
83+
rank2 = user_waiting2.user.rank()
84+
85+
return rank1 == rank2 or are_ranks_adjacent(rank1, rank2)
8586

8687

8788
MatchmakingQueueAtomic = MatchmakingQueue | UserWaiting

0 commit comments

Comments
 (0)