INDAPlus21 / INDAPlus21/carlch-prolog-10
Pass
- Dominant language
- Prolog
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Very well done Carl!**
Thank you for readable code, otherwise I would have been forced to probably give you komplettering on it ;)
Very nice looking plane!
Readability formatting is all personal preference. I find yours to be a little dence. In the future, your code will depend on whatever your team or company deems worthy (given that you stick with us). Until then, find a formatting that your are confortable with others reading; something that makes you look good.
_Your code_:
```prolog
is_group_alive(Row, Col, Board, Stone, Searched):-
% ...
(Current_Stone = e ;
(Current_Stone = Stone),
Above is Row - 1,
Below is Row + 1,
Left is Col - 1,
Right is Col + 1, (
is_group_alive(Above, Col, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Below, Col, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Row, Left, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Row, Right, Board, Current_Stone, [[Row, Col] | Searched])
)).
```
_Airy formatting_:
```prolog
is_group_alive(Row, Col, Board, Stone, Searched):-
% ...
(
Current_Stone = e;
Current_Stone = Stone,
Above is Row - 1,
Below is Row + 1,
Left is Col - 1,
Right is Col + 1,
(
is_group_alive(Above, Col, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Below, Col, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Row, Left, Board, Current_Stone, [[Row, Col] | Searched]) ;
is_group_alive(Row, Right, Board, Current_Stone, [[Row, Col] | Searched])
)
).
```
Thanks for your hard work!
Educational read: https://www.metalevel.at/prolog/fun
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no source file, test, or entry point. It contains praise and a Prolog formatting example rather than a specific requested change, so there is no defined completion condition to verify.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100