]> Shamusworld >> Repos - warehouse-man-deluxe/blobdiff - src/gameboard.cpp
Added rudimentary animation.
[warehouse-man-deluxe] / src / gameboard.cpp
index 0c4a89ec148a0e3f65dbb7a8eadf990a5e4479ea..b18fe9a1e2010d016022b9b5499981ecf9030f77 100644 (file)
@@ -166,3 +166,40 @@ int GameBoard::Move(int & var, int direction, char cell1, char cell2)
        return PMInvalid;
 }
 
+
+bool GameBoard::IsBoxNOfPlayer(void)
+{
+       if ((board[playerX + ((playerY - 1) * width)] & ~GTBoxSpot) == GTBox)
+               return true;
+
+       return false;
+}
+
+
+bool GameBoard::IsBoxSOfPlayer(void)
+{
+       if ((board[playerX + ((playerY + 1) * width)] & ~GTBoxSpot) == GTBox)
+               return true;
+
+       return false;
+}
+
+
+bool GameBoard::IsBoxEOfPlayer(void)
+{
+       if ((board[(playerX + 1) + (playerY * width)] & ~GTBoxSpot) == GTBox)
+               return true;
+
+       return false;
+}
+
+
+bool GameBoard::IsBoxWOfPlayer(void)
+{
+       if ((board[(playerX - 1) + (playerY * width)] & ~GTBoxSpot) == GTBox)
+               return true;
+
+       return false;
+}
+
+