From 98efcbd830f0306827cdfb09321c6f86b74adc16 Mon Sep 17 00:00:00 2001 From: stephen-hero <78870893+stephen-hero@users.noreply.github.com> Date: Sat, 23 Dec 2023 02:54:46 +0200 Subject: [PATCH] Update task.md language in hints checked --- .../wordsGeneratorServerTeams/task.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wordsGeneratorServer/wordsGeneratorServerTeams/task.md b/wordsGeneratorServer/wordsGeneratorServerTeams/task.md index effb5d84..a495c8b9 100644 --- a/wordsGeneratorServer/wordsGeneratorServerTeams/task.md +++ b/wordsGeneratorServer/wordsGeneratorServerTeams/task.md @@ -29,14 +29,14 @@ If you have any difficulties, **hints will help you solve this task**. ### Hints -
+
-Sometimes, type aliases are used in cases where there is no certainty that -the type used will not be replaced in the future. +Sometimes, type aliases are used in cases where there uncertainty whether +the type being used will be replaced in the future. -For example, right now, we use the `Int` type as the `Identifier`, -but in the future, we can create our own class. -Using a type alias in this case will help us make this change as painless as possible in the future. +For example, right now, we're using the `Int` type as the `Identifier`, +but in the future, we may create our own class. +Using a type alias in this case will help us make such a transition as seamless as possible.
@@ -46,7 +46,7 @@ It is convenient to use data classes in all cases when we need just to store something and have automatically implemented methods, like the `toString` method.
-
+
In this game, the team is defined only by its `id` (as well as the number of points), and we need a `name` only for a pretty display on the screen. @@ -55,17 +55,17 @@ when we need just to store something and have automatically implemented methods,
-The variable `idCounter` stores some internal information about the last value for an id. -So, the best way is to mark it as a private property to forbid access outside the class. +The variable `idCounter` stores internal information about the last value for an id. +Therefore, the best approach is to mark it as a private property to restrict access from outside the class. A simple example of why it is bad to use the `public` modifier here is that in such a case, the user would be able to change the value of the `idCounter` property on their own -and we cannot guarantee the uniqueness of team ids. +and we would not be able to ensure the uniqueness of team ids.
-
+
-In Kotlin, you can use `++` to return the old value and then increment it: +In Kotlin, you can use `++` to increment a value, where it first returns the old value before incrementing: ```kotlin var a = 0