Replaced hard-coded values with game and view parameters.