diff --git a/pelita/layout.py b/pelita/layout.py
index e5797adc..66fa2ebd 100644
--- a/pelita/layout.py
+++ b/pelita/layout.py
@@ -545,9 +545,9 @@ def layout_for_team(layout, is_blue=True, is_noisy=(False, False)):
         'is_noisy' : is_noisy,
     }
 
-def layout_agnostic(layout_for_team, is_blue=True):
-    """ Converts a layout dict with 2 bots and enemies to a layout
-    with 4 bots.
+def layout_agnostic(layout, is_blue=True):
+    """ Converts a layout dict with 2 bots and enemies (team-style)
+    to a layout with 4 bots (server-style).
     """
     if "enemy" not in layout:
         raise ValueError("Layout is already in server-style.")

layout_agnostic needs tests and fixes
Currently broken. https://github.com/ASPP/pelita/blob/2f17db5355b4dffae8a130ede549ab869b2f1ce2/pelita/layout.py#L548-L566

diff --git a/test/test_layout.py b/test/test_layout.py
index ff30905a..4d3d8638 100644
--- a/test/test_layout.py
+++ b/test/test_layout.py
@@ -454,3 +454,38 @@ def test_layout_for_team():
 
     with pytest.raises(ValueError):
         layout_for_team(parse_layout(red1))
+
+def test_layout_agnostic():
+    """
+    Test if team-style layout can be converted to server-style layout.
+    
+    Uses this layout:
+
+    ####
+    #01#
+    #EE#
+    #..#
+    ####
+    """
+
+    l = {
+        'walls': [(0,0),(0,1),(0,2),(0,3),(1,0),(1,3),(2,0),(2,3),(3,0),(3,3),(4,0),(4,1),(4,2),(4,3)],
+        'food': [(3,1),(3,2)],
+        'bots': [(1,1),(1,2)],
+        'enemy': [(2,1),(2,2)]
+        }
+
+
+    l_expected_blue = {
+        'walls': [(0,0),(0,1),(0,2),(0,3),(1,0),(1,3),(2,0),(2,3),(3,0),(3,3),(4,0),(4,1),(4,2),(4,3)],
+        'food': [(3,1),(3,2)],
+        'bots': [(1,1),(2,1),(1,2),(2,2)]
+        }
+    l_expected_red = {
+        'walls': [(0,0),(0,1),(0,2),(0,3),(1,0),(1,3),(2,0),(2,3),(3,0),(3,3),(4,0),(4,1),(4,2),(4,3)],
+        'food': [(3,1),(3,2)],
+        'bots': [(2,1),(1,1),(2,2),(1,2)]
+        }
+
+    assert layout_agnostic(l, is_blue=True) == l_expected_blue
+    assert layout_agnostic(l, is_blue=False) == l_expected_red

pip install -e .
parse_log_pytest
pytest-cov codecov coveralls pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
charset-normalizer==3.4.1
codecov==2.1.13
coverage==6.5.0
coveralls==3.3.1
docopt==0.6.2
exceptiongroup==1.2.2
idna==3.10
importlib-metadata==6.7.0
iniconfig==2.0.0
networkx==2.6.3
numpy==1.21.6
packaging==24.0
-e git+https://github.com/ASPP/pelita.git@557c3a757a24e0f1abe25f7edf5c4ffee83a077e#egg=pelita
pluggy==1.2.0
pytest==7.4.4
pytest-cov==4.1.0
PyYAML==6.0.1
pyzmq==26.2.1
requests==2.31.0
tomli==2.0.1
typing_extensions==4.7.1
urllib3==2.0.7
zipp==3.15.0

name: pelita
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - charset-normalizer==3.4.1
      - codecov==2.1.13
      - coverage==6.5.0
      - coveralls==3.3.1
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - networkx==2.6.3
      - numpy==1.21.6
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pyyaml==6.0.1
      - pyzmq==26.2.1
      - requests==2.31.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - zipp==3.15.0
prefix: /opt/conda/envs/pelita

test/test_layout.py::test_layout_agnostic
test/test_layout.py::test_get_available_layouts test/test_layout.py::test_get_layout_by_name test/test_layout.py::test_get_random_layout test/test_layout.py::test_get_random_layout_returns_correct_layout test/test_layout.py::test_not_enclosed_by_walls test/test_layout.py::test_illegal_character test/test_layout.py::test_illegal_index test/test_layout.py::test_illegal_walls test/test_layout.py::test_illegal_width test/test_layout.py::test_different_width test/test_layout.py::test_combined_layouts test/test_layout.py::test_combined_layouts_empty_lines test/test_layout.py::test_duplicate_bots_forbidden test/test_layout.py::test_duplicate_bots_allowed test/test_layout.py::test_combined_layouts_broken_lines test/test_layout.py::test_roundtrip test/test_layout.py::test_roundtrip_overlapping test/test_layout.py::test_empty_lines test/test_layout.py::test_equal_positions test/test_layout.py::test_legal_positions[pos0-legal_positions0] test/test_layout.py::test_legal_positions[pos1-legal_positions1] test/test_layout.py::test_legal_positions[pos2-legal_positions2] test/test_layout.py::test_legal_positions[pos3-legal_positions3] test/test_layout.py::test_legal_positions_fail[pos0] test/test_layout.py::test_legal_positions_fail[pos1] test/test_layout.py::test_legal_positions_fail[pos2] test/test_layout.py::test_legal_positions_fail[pos3] test/test_layout.py::test_legal_positions_fail[pos4] test/test_layout.py::test_enemy_raises test/test_layout.py::test_enemy_positions[\n test/test_layout.py::test_layout_for_team
pelita/layout.py
pelita/layout.py