This question has options. Is the word "rule" used in the same way in the following two sentences?

It was his rule to take a walk before breakfast.

He knew the rules of chess.

Possible answers:
(a). different meanings.
(b). the same meaning.
(a).