You are viewing a single comment's thread from:

RE: Archipelago - Huge Refactor!

in #utopian-io6 years ago
  • This is for sure a very educational project for you and also for other. Keep educating trough your choices and explanation of them.
  • Great article, but you forgot to add images. Games are perfect eye candy, springkle some in your posts.
  • That's a monster loop if I've ever seen one! Are you scanning the board?
  • Please make smaller commits in the future, that helps with separation of concerns.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Sort:  

Thanks @helo!

Yes, the loop scans the board array, finds forts, scans a 1-tile grid around the fort, excludes diagonals, checks the tiles are on the board (since forts may be at the edge of the board), checks the tiles are sea, and if so creates a harbour protected by the fort!

There's a lot of this kind of looping in the code. Now that I have the Piece constructor I may think about ways to use the piece itself to find harbours on tiles next to it, which may be cleaner.

Thanks for the review.

Thank you for your review, @helo! Keep up the good work!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 60675.01
ETH 2605.91
USDT 1.00
SBD 2.64