Fixed the updateGame method

Fixed method to avoid arrayIndexOutOfBounds exceptions.