cosmos / b9-checkers-academy-draft

32 stars 40 forks source link

Incorrect MaxTurnDurationInSeconds constant naming #26

Closed aomerk closed 2 years ago

aomerk commented 2 years ago

To compute a game's deadline, we are giving it a default maximum duration of 24 hours, which is defined as:

    MaxTurnDurationInSeconds = time.Duration(24 * 3_600 * 1000_000_000) // 1 day

However, 24 * 3600 * 1e9 is a day in nanoseconds, I think we should rename:

MaxTurnDurationInSeconds to MaxTurnDurationInNanoseconds

xavierlepretre commented 2 years ago

Thank you for the heads up.

Good point. In fact, I would prefer to rename it to MaxTurnDuration because the nanoseconds part is encapsulated in Duration.

Also, the simpler branch is the final one. There are intermediate branches that are used to display the progressive build up of the game. In particular, this constant is introduced in game-deadline. So this is where I will make the change. Unless you want to create a new PR that makes this change on game-deadline?

Thank you.

aomerk commented 2 years ago

Oh I see. There wasn't an info about contribution in the README, but now I see that there was a list of feature branchs.Sure, I can create a new PR.

See this one with the correct branch