Closed edutools-service closed 11 months ago
Hello,
In this case, using val (immutable) variables is expected since variables are not meant to be modified in the process.
In this exercise, the variables provide stored information in the output text. If it would require performing any operations with them (reassignments), using var (mutable) variables will be suitable. IDE additionally highlights variable definitions if you try to use mutable variables.
The usage of mutable variables is described in the "Loops" lesson.
the description is as follow "Description: Add variables of different types to customize the game and display the game information in the console:
Int variable wordLength to define the length of the word Int variable maxAttemptsCount to define the max number of user attempts String variable secretExample to define an example of the hidden word (to explain it to the user)" but i can see the solution failing in unit test with this error message "java.lang.IllegalStateException: The code should contains a definition of the wordLength variable! Please add or code in your solution.Please be careful with styles - check the spaces around =.
at util.VariableKt.isVariableExist(Variable.kt:25)"
java.lang.IllegalStateException: The code should contains a definition of the wordLength variable! Please add or code in your solution.Please be careful with styles - check the spaces around =.
at util.VariableKt.isVariableExist(Variable.kt:25)