added parentheses around cart calculation and changed move tile to pointer to avoid object slicing