From cca1fa692330d736565ca090dc2437dfece9ad35 Mon Sep 17 00:00:00 2001
From: SP Mohanty <spmohanty91@gmail.com>
Date: Tue, 2 Jul 2019 19:47:06 +0200
Subject: [PATCH] Refactor code:

---
 flatland/utils/graphics_pil.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py
index fbac435..6728b5a 100644
--- a/flatland/utils/graphics_pil.py
+++ b/flatland/utils/graphics_pil.py
@@ -44,16 +44,16 @@ class PILGL(GraphicsLayer):
         self.background_grid = np.zeros(shape=(self.width, self.height))
 
         if jupyter is False:
-            self.screen_width = 99999
-            self.screen_height = 99999
+            self.screen_width = 800
+            self.screen_height = 600
 
             if platform.system() == "Windows" or platform.system() == "Linux":
                 for m in get_monitors():
                     self.screen_height = min(self.screen_height, m.height)
                     self.screen_width = min(self.screen_width, m.width)
-            else:
-                self.screen_width = 800
-                self.screen_height = 600
+                # Note: screeninfo doesnot have proper support for 
+                # OSX yet, hence the default values of 800,600
+                # will be used for the same.
 
             w = (self.screen_width - self.width - 10) / (self.width + 1 + self.linewidth)
             h = (self.screen_height - self.height - 10) / (self.height + 1 + self.linewidth)
-- 
GitLab