pelita
pelita copied to clipboard
WIP: Adding support for zeroconf
This commit adds basic support for zeroconf-based networking.
Instead of a player location, pelita now understands the keyword SCAN
to search for remote players that advertise themselves via zeroconf:
pelita ./own_player SCAN
A zeroconf-based remote player can be started with the argument
--advertise
like so:
pelita-player --advertise --remote ./some_bot.py tcp://192.168.1.23:10027
Demo:
https://user-images.githubusercontent.com/216179/168391205-0d130500-2295-47e0-92bb-9b4883e43d95.mov
Commit needs https://github.com/jstasiak/python-zeroconf and https://github.com/Textualize/rich (eye-candy) to run.
Not sure if we can call our service _pelita-player._tcp
. For IANA correctness, we might want to create a uuid.
Codecov Report
Merging #743 (0870a64) into main (d5f4bc6) will increase coverage by
0.11%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #743 +/- ##
==========================================
+ Coverage 85.55% 85.67% +0.11%
==========================================
Files 21 21
Lines 2291 2345 +54
==========================================
+ Hits 1960 2009 +49
- Misses 331 336 +5
Impacted Files | Coverage Δ | |
---|---|---|
pelita/player/FoodEatingPlayer.py | 87.50% <0.00%> (-6.25%) |
:arrow_down: |
pelita/tournament/__init__.py | 72.78% <0.00%> (-0.65%) |
:arrow_down: |
pelita/tournament/roundrobin.py | 100.00% <0.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Merging as a beta feature.