Skip to content

Commit

Permalink
Replace push with click (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbirillo authored Dec 18, 2023
1 parent 8c3d046 commit cb0219f
Show file tree
Hide file tree
Showing 47 changed files with 112 additions and 112 deletions.
6 changes: 3 additions & 3 deletions AlmostDone/CompleteTheProject/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This time, without a new theoretical part!

Finish the game – implement the `photoshop` function, that combines all functions together.

<div class="hint" title="Push me to see the signature of the photoshop function">
<div class="hint" title="Click me to see the signature of the photoshop function">

The signature of the function is:
```kotlin
Expand All @@ -22,7 +22,7 @@ Finally, call this function in the `main` function.

Also, the `main` function will be checked - just uncomment code in the `main` function.

<div class="hint" title="Push me to see the console photoshop project example">
<div class="hint" title="Click me to see the console photoshop project example">

![Console photoshop example](../../utils/src/main/resources/images/part1/almost.done/game.gif "Console photoshop example")

Expand All @@ -36,7 +36,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to see possible ways to expand the project">
<div class="hint" title="Click me to see possible ways to expand the project">

Try expanding this project yourself! For example, add new predefined pictures or filters.
</div>
2 changes: 1 addition & 1 deletion AlmostDone/MultiRowStrings/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ It's time to practice!

Implement the `trimPicture` function, which accepts a picture and removes all indents from it.

<div class="hint" title="Push me to see the new signature of the trimPicture function">
<div class="hint" title="Click me to see the new signature of the trimPicture function">

The signature of the function is:
```kotlin
Expand Down
4 changes: 2 additions & 2 deletions AlmostDone/NullSafety/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Implement the `chooseFilter` function, which asks the user to choose
a filter (`borders` or `squared`, the full text is `Please choose the filter: 'borders' or 'squared'.`)
and returns it.

<div class="hint" title="Push me to see the signature of the chooseFilter function">
<div class="hint" title="Click me to see the signature of the chooseFilter function">

The signature of the function is:
```kotlin
Expand All @@ -27,7 +27,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to learn an efficient way to use `when`">
<div class="hint" title="Click me to learn an efficient way to use `when`">

The <code>when</code> expression allows you to use several values in one branch and define a variable in place:

Expand Down
4 changes: 2 additions & 2 deletions AlmostDone/NullSafetyPartTwo/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We need to provide the user to be able to transform their own pictures. Let's do

Implement `getPicture` function that asks the user to choose a pre-defined picture or to input a custom picture.

<div class="hint" title="Push me to see the signature of the getPicture function">
<div class="hint" title="Click me to see the signature of the getPicture function">

The signature of the function is:
```kotlin
Expand Down Expand Up @@ -39,7 +39,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to get a code style hint">
<div class="hint" title="Click me to get a code style hint">

To check the user's answer in the `getPicture` function,
it is most convenient to use the `when` expression instead a composite `if`.
Expand Down
12 changes: 6 additions & 6 deletions AlmostDone/StringFunctions/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For the border symbol, please use the pre-defined variable `borderSymbol`, it st
println(borderSymbol) // #
```

<div class="hint" title="Push me to see an example of applyBordersFilter work">
<div class="hint" title="Click me to see an example of applyBordersFilter work">

Here's an example of the function's work:
<p>
Expand All @@ -28,7 +28,7 @@ In other words, you need to pad the shorter lines with the `separator` to the le
To get the width of the picture, you cak use the predefined function `getPictureWidth`,
that returns the maximum of width from all lines from the picture.

<div class="hint" title="Push me to see an example of getPictureWidth work">
<div class="hint" title="Click me to see an example of getPictureWidth work">

```kotlin
val pictureWidth = getPictureWidth(picture) // calculate the longest line from the picture and returns it's width
Expand Down Expand Up @@ -57,7 +57,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to see several examples how applyBordersFilter function should work">
<div class="hint" title="Click me to see several examples how applyBordersFilter function should work">

First example:
<img src="../../utils/src/main/resources/images/part1/almost.done/examples/borders/android.png" alt="Example of the function's work" width="200"/>
Expand All @@ -67,7 +67,7 @@ Second example:

</div>

<div class="hint" title="Push me to learn how to run the applyBordersFilter function with pre-defined pictures">
<div class="hint" title="Click me to learn how to run the applyBordersFilter function with pre-defined pictures">

To check how your function works, you can run it in <code>main</code> by passing one of the pre-defined pictures:

Expand All @@ -80,14 +80,14 @@ fun main() {
```
</div>

<div class="hint" title="Push me to get a hint how to calculate the length of the top and bottom edges for the new picture">
<div class="hint" title="Click me to get a hint how to calculate the length of the top and bottom edges for the new picture">

The length of the top and bottom edges of the border will be 4 characters longer than the width of the initial picture,
since we add the <code>borderSymbol</code> and the <code>separator</code> on both sides of the image.
</div>


<div class="hint" title="Push me to learn how to implement the getPictureWidth function by my own">
<div class="hint" title="Click me to learn how to implement the getPictureWidth function by my own">

If you want, you can try to implement your own implementation fo the `getPictureWidth` function:
split the picture by using <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/lines.html">`lines`</a> function
Expand Down
12 changes: 6 additions & 6 deletions AlmostDone/StringFunctionsPartTwo/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For the border symbol, please use the pre-defined variable `borderSymbol`, it st
println(borderSymbol) // #
```

<div class="hint" title="Push me to see an example of applySquaredFilter work">
<div class="hint" title="Click me to see an example of applySquaredFilter work">

Here's an example of the function's work:
<p>
Expand All @@ -27,7 +27,7 @@ In other words, you need to pad the shorter lines with the `separator` to the le
To get the width of the picture, you cak use the predefined function `getPictureWidth`,
that returns the maximum of width from all lines from the picture.

<div class="hint" title="Push me to see an example of getPictureWidth work">
<div class="hint" title="Click me to see an example of getPictureWidth work">

```kotlin
val pictureWidth = getPictureWidth(picture) // calculate the longest line from the picture and returns it's width
Expand Down Expand Up @@ -55,7 +55,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to see several examples how applySquaredFilter function should work">
<div class="hint" title="Click me to see several examples how applySquaredFilter function should work">

First example:
<img src="../../utils/src/main/resources/images/part1/almost.done/examples/squared/android.png" alt="Example of the function's work" width="400"/>
Expand All @@ -64,7 +64,7 @@ Second example:
<img src="../../utils/src/main/resources/images/part1/almost.done/examples/squared/monkey.png" alt="Example of the function's work" width="400"/>
</div>

<div class="hint" title="Push me to learn how to run the applySquaredFilter function with pre-defined pictures">
<div class="hint" title="Click me to learn how to run the applySquaredFilter function with pre-defined pictures">

To check how your function works, you can run it in <code>main</code> by passing one of the pre-defined pictures:

Expand All @@ -78,14 +78,14 @@ fun main() {
</div>


<div class="hint" title="Push me to learn the main idea of the algorithm">
<div class="hint" title="Click me to learn the main idea of the algorithm">

You can use the `applyBordersFilter` function to add the borders, next
create two `StringBuilder`s (one for the top and one for the bottom part),
and put them row by row.
</div>

<div class="hint" title="Push me to learn how to implement the getPictureWidth function by my own">
<div class="hint" title="Click me to learn how to implement the getPictureWidth function by my own">

If you want, you can try to implement your own implementation fo the `getPictureWidth` function:
split the picture by using <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/lines.html">`lines`</a> function
Expand Down
2 changes: 1 addition & 1 deletion AlmostDone/When/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and a filter name, applies the `trimPicture` function to the picture and finally
applies the given filter, and returns the updated picture. To apply a filter,
just call one of the already defined functions `applyBordersFilter` or `applySquaredFilter`.

<div class="hint" title="Push me to see the signature of the applyFilter function">
<div class="hint" title="Click me to see the signature of the applyFilter function">

The signature of the function is:
```kotlin
Expand Down
8 changes: 4 additions & 4 deletions AlmostDone/applyBordersFilterFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Add several functions to the game:
function instead of implementation as a temporary solution.
We will implement this function during solving next tasks.

<div class="hint" title="Push me to see the signature of the applyBordersFilter function">
<div class="hint" title="Click me to see the signature of the applyBordersFilter function">

The signature of the function is:
```kotlin
fun applyBordersFilter(picture: String): String
```
</div>

<div class="hint" title="Push me to see an example of the borders filter after completing the project">
<div class="hint" title="Click me to see an example of the borders filter after completing the project">

An example of this filter:
<p>
Expand All @@ -33,15 +33,15 @@ An example of this filter:
function instead of implementation as a temporary solution.
We will implement this function during solving next tasks.

<div class="hint" title="Push me to see the signature of the applySquaredFilter function">
<div class="hint" title="Click me to see the signature of the applySquaredFilter function">

The signature of the function is:
```kotlin
fun applySquaredFilter(picture: String): String
```
</div>

<div class="hint" title="Push me to see an example of the squared filter after completing the project">
<div class="hint" title="Click me to see an example of the squared filter after completing the project">

An example of this filter:
<p>
Expand Down
2 changes: 1 addition & 1 deletion AlmostDone/choosePictureFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ of the pre-defined pictures they want to change.

Implement `choosePicture` picture that chooses one pre-defined picture by its name.

<div class="hint" title="Push me to see the signature of the choosePicture function">
<div class="hint" title="Click me to see the signature of the choosePicture function">

The signature of the function is:
```kotlin
Expand Down
2 changes: 1 addition & 1 deletion AlmostDone/safeReadLineFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It's time to implement this function by yourself!
Implement the `safeReadLine` function, which returns the string the user inputs or throws an error
if the `null` value was received.

<div class="hint" title="Push me to see the signature of the safeReadLine function">
<div class="hint" title="Click me to see the signature of the safeReadLine function">

The signature of the function is:
```kotlin
Expand Down
2 changes: 1 addition & 1 deletion Chat/askFirstQuestion/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to learn which functions can be helpful to solve this task">
<div class="hint" title="Click me to learn which functions can be helpful to solve this task">

To print a question, you can use the `println` function from the previous steps.
Then, to store the user's input in a variable, you can use the `readlnOrNull` function.
Expand Down
4 changes: 2 additions & 2 deletions Chat/askSecondQuestion/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to learn which functions can be helpful to solve this task">
<div class="hint" title="Click me to learn which functions can be helpful to solve this task">

To print the answer, you can use the `println` function from the previous steps.
Then, to read the user's input into a variable, you can use the `readlnOrNull` function.

</div>

<div class="hint" title="Push me to learn how to combine text and string variables together">
<div class="hint" title="Click me to learn how to combine text and string variables together">

String literals may contain template expressions – pieces of code that are
evaluated and whose results are concatenated into the string.
Expand Down
6 changes: 3 additions & 3 deletions Chat/completeTheProject/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Push me to view the expected state of the game after completing this task">
<div class="hint" title="Click me to view the expected state of the game after completing this task">

The game should look like this:

![Chat example](../../utils/src/main/resources/images/part1/chat/game.gif "Chat example")

</div>

<div class="hint" title="Push me to learn which functions can be helpful to solve this task">
<div class="hint" title="Click me to learn which functions can be helpful to solve this task">

To print the answer, you can use the `println` function from the previous steps.

</div>

<div class="hint" title="Push me to learn how to combine text and string variables together">
<div class="hint" title="Click me to learn how to combine text and string variables together">

String literals may contain template expressions – pieces of code that are
evaluated and whose results are concatenated into the string.
Expand Down
10 changes: 5 additions & 5 deletions Hangman/Core/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Implement the `generateNewUserWord` function,
which generates a new sequence of underscores and already guessed letters
by means of a string with `secret`, a char with user's `guess`, and a string `currentUserWord`.

<div class="hint" title="Push me to see the new signature of the generateNewUserWord function">
<div class="hint" title="Click me to see the new signature of the generateNewUserWord function">

The signature of the function is:
```kotlin
Expand All @@ -25,7 +25,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="Hint" title="Push me to see examples how the currentUserWord function works">
<div class="Hint" title="Click me to see examples how the currentUserWord function works">

Here are several examples of the _currentUserWord_ function's work:

Expand All @@ -37,7 +37,7 @@ Here are several examples of the _currentUserWord_ function's work:
- secret = `"BOOK"`, guess = `'K'`, currentUserWord = `"_ _ _ K"`, result = `"_ _ _ K"`;
</div>

<div class="Hint" title="Push me to learn more about indices property">
<div class="Hint" title="Click me to learn more about indices property">

To make a loop check over each char in a string, you can use the <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/indices.html">`indices`</a> property:
```
Expand All @@ -51,7 +51,7 @@ It is the same as:
It's a more convenient and shorter way to represent a range of indices.
</div>

<div class="Hint" title="Push me to learn more about removeSuffix function">
<div class="Hint" title="Click me to learn more about removeSuffix function">

The [`removeSuffix`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/remove-suffix.html) function
helps to delete a suffix from a string:
Expand All @@ -62,7 +62,7 @@ println("abcdef".removeSuffix("f")) // abcde
It can be helpful if you need to delete some extra separators from the end of the string.
</div>

<div class="Hint" title="Push me to check the mai idea of the algorithm">
<div class="Hint" title="Click me to check the mai idea of the algorithm">

To implement the `generateNewUserWord` function you can just to check for each letter from the `secret`
if this letter equals with the `guess`.
Expand Down
2 changes: 1 addition & 1 deletion Hangman/generateSecretFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The goal of this task is to generate a random word for the game.

Implement the `generateSecret` function, that generates a _random_ word from the `words` list.

<div class="hint" title="Push me to see the new signature of the generateSecret function">
<div class="hint" title="Click me to see the new signature of the generateSecret function">

The signature of the function is:
```kotlin
Expand Down
4 changes: 2 additions & 2 deletions Hangman/getHiddenSecretFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In this step we will add a function to generate the initial hidden secret with u
Implement the `getHiddenSecret` function, that accepts `wordLength`
and generates the initial hidden secret with underscores, e.g. for `wordLength` `4` the result will be `_ _ _ _`.

<div class="hint" title="Push me to see the new signature of the getHiddenSecret function">
<div class="hint" title="Click me to see the new signature of the getHiddenSecret function">

The signature of the function is:
```kotlin
Expand All @@ -27,7 +27,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="Hint" title="Push me to learn more about joinToString function">
<div class="Hint" title="Click me to learn more about joinToString function">

To join a list of elements into a string,
you can use the [`joinToString`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/join-to-string.html)
Expand Down
2 changes: 1 addition & 1 deletion Hangman/getRoundResultsFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ which accepts a string `secret` - the secret of the current of the game,
a char `guess` - a current guess from the user, and a string `currentUserWord` - a current state of the game, e.g. `_ _ _ K`.
This function should check if the user guessed a char.

<div class="hint" title="Push me to see the new signature of the safeUserInput function">
<div class="hint" title="Click me to see the new signature of the safeUserInput function">

The signature of the function is:
```kotlin
Expand Down
6 changes: 3 additions & 3 deletions Hangman/isCompleteFunction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It's time to practice! Let's start with a simple function.
Implement the `isComplete` function, which accepts two string arguments - `secret` and `currentGuess`,
and checks if the game is complete. The game is complete only if `secret` and `currentGuess` equal.

<div class="hint" title="Push me to see the new signature of the isComplete function">
<div class="hint" title="Click me to see the new signature of the isComplete function">

The signature of the function is:
```kotlin
Expand All @@ -28,7 +28,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="Hint" title="Push me to see examples how the isComplete function works">
<div class="Hint" title="Click me to see examples how the isComplete function works">

Here are several examples of the _isComplete_ function's work:

Expand All @@ -37,7 +37,7 @@ Here are several examples of the _isComplete_ function's work:
- secret = "ABC", currentGuess = "A A A", result = false;
</div>

<div class="Hint" title="Push me to learn how to replace separator in the current user's guess">
<div class="Hint" title="Click me to learn how to replace separator in the current user's guess">

The easiest way to replace `separator` in `currentGuess` is to use the built-in function [`replace`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/replace.html):
```kotlin
Expand Down
Loading

0 comments on commit cb0219f

Please sign in to comment.