From f0f0c01c001fef0bdc6bf8d60da329e4c7b55223 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 18 Nov 2020 00:23:06 +0100
Subject: [PATCH] Minor refactor.

---
 plomrogue/commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plomrogue/commands.py b/plomrogue/commands.py
index e40f530..ed7d3dd 100644
--- a/plomrogue/commands.py
+++ b/plomrogue/commands.py
@@ -194,7 +194,7 @@ cmd_MAP_CONTROL_PW.argtypes = 'char string'
 def cmd_THING(game, yx, thing_type, thing_id):
     if not thing_type in game.thing_types:
         raise GameError('illegal thing type %s' % thing_type)
-    if yx.y < 0 or yx.x < 0 or yx.y >= game.map.size.y or yx.x >= game.map.size.x:
+    if not game.map.inside(yx):
         raise GameError('illegal position %s' % yx)
     t_old = None
     if thing_id > 0:
-- 
2.30.2