epicalyx / toolkitten

A toolkit for #1millionwomentotech community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continent Counter

This is the solution for continent counter hackathon challenge -week 5 - Introduction to Javascript

The problem statement is as follows: Task: Calculate the size of a continent you are standing on in your 11 x 11 world in Civilization III.

Bonuses for:

-> calculate continent size for all continents in the world

-> random world generator

-> fastest program

-> benchmarking

-> extension of the problem to n x n size world

Algorithm used: Flood Fill Algorithm has been used where recursive calls are made to the function in all possible adjacent directions to a given position to calculate the area.

In the program the '0' in the world map represents water and '1' represents land.

Bonuses included:

-> Calculation of continent size of all continents

-> Random world generation

-> The program is quite fast

-> Extension of the problem to n x n size world

JavaScript code has been included as inline Javascript in a "script" tag in HTML file.

About

A toolkit for #1millionwomentotech community.

License:MIT License


Languages

Language:Jupyter Notebook 52.6%Language:HTML 45.9%Language:Python 1.5%Language:CSS 0.0%