Explain solidity>return values

Helper Functions

Now let's turn our isBoardFull function into a proper helper function.

Private Functions:

Functions marked private can only be called from inside the contract. They're perfect for helper functions.

View Functions:

Functions that only read data (don't modify state) should be marked view. This tells Solidity the function won't change anything.

Return Values:

Use returns (type) to specify what a function gives back.

Example:

function isWinner() private view returns (bool) { ... }



Rename isBoardFull to checkDraw and change it from public view to private view. This makes it a helper function only for internal use.

Create private checkDraw function
0%
Requirements:
Renamed to checkDraw
Function is private
Function is view
Returns bool
Has for loop logic