private function setStates(array $states)
    {
        if (empty($states)) {
            throw new \InvalidArgumentException(
                'You must provide cat states'
            );
        }

        $height = count($states[0]);
        $width = 0;

        foreach ($states as $state) {
            if (!is_array($state)) {
                throw new \InvalidArgumentException(
                    'States must be an array of strings'
                );
            }

            if (count($state) !== $height) {
                throw new \InvalidArgumentException(
                    'Height must be the same for all states'
                );
            }

            foreach ($state as $line) {
                if (!is_string($line)) {
                    throw new \InvalidArgumentException(
                        'States must be an array of strings'
                    );
                }

                $width = max($width, strlen($line));
            }
        }

        $this->states = $states;
        $this->width = $width;
        $this->height = $height;
    }