From 7714f511e3b7e2028c67374570c95a9ef32e2b35 Mon Sep 17 00:00:00 2001 From: Elliot Tower Date: Fri, 7 Jul 2023 00:34:45 -0400 Subject: [PATCH] Fix formatting for example code in chess docstring (doctest) (#1013) --- pettingzoo/classic/chess/chess.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pettingzoo/classic/chess/chess.py b/pettingzoo/classic/chess/chess.py index f1e6df669..378eef0b4 100644 --- a/pettingzoo/classic/chess/chess.py +++ b/pettingzoo/classic/chess/chess.py @@ -71,11 +71,13 @@ You can get back the original (x,y,c) coordinates from the integer action `a` with the following expression: `(a // (8*73), (a // 73) % 8, a % (8*73) % 73)` -> x = 6 -> y = 0 -> c = 12 -> a = x*(8*73) + y*73 + c -> print(a // (8*73), a % (8*73) // 73, a % (8*73) % 73) # -> 6 0 12 +Example: + >>> x = 6 + >>> y = 0 + >>> c = 12 + >>> a = x*(8*73) + y*73 + c + >>> print(a // (8*73), a % (8*73) // 73, a % (8*73) % 73) + 6 0 12 Note: the coordinates (6, 0, 12) correspond to column 6, row 0, plane 12. In chess notation, this would signify square G1: