Skip to content

Conversation

@Rishav159
Copy link
Contributor

This commit:

  • Adds a map coloring problem with a map of Australia. The states can be colored by choosing a color from a palette and then clicking on the state. The reader is asked to color all the states following the condition that no two neighboring states can have the same color.
  • Increases width of the content div in index.html of Chapter 4. This makes the content more clear.
    Development in 6-Constraint Satisfaction Problems #88

@redblobgames
Copy link
Contributor

Nice diagram! The code for drawText, bindClicks would be cleaner if you made a list of areas like

let territories = [
    ['#NT', 'NT', 1/7.5, 1/6],
    ['#WA', 'WA', 1/16, 1/4],
   …
]

That way you can loop through them. Similarly, drawPalette would be simpler if you had a list of colors in the palette.

@redblobgames
Copy link
Contributor

Color suggestions: try changing hsl(,100%,50%) for the main map areas to hsl(,50%,80%). It will make the text easier to read.

For the text, right now it's inheriting the stroke and fill colors from the parent <g>. I suggest stroke:none;fill:black on them to make them solid.

@Rishav159
Copy link
Contributor Author

Rishav159 commented Jun 24, 2017

Updated as per reviews. However, I am not so sure about the color suggestion.
I have updated from hsl(,100%,50%) to hsl(,80%,70%)
Here is a comparison:
This is with hsl(,80%,70%)
screenshot from 2017-06-24 20-27-55
This is with hsl(
,50%,80%)
screenshot from 2017-06-24 20-28-35

After fixing the text colors, I think hsl(___,80%,70%) looks better. I have updated with the new colors. What do you think ?

@redblobgames
Copy link
Contributor

Looks good! The text is readable now :)

@redblobgames redblobgames merged commit e0bb4ff into aimacode:master Jun 24, 2017
@Rishav159 Rishav159 deleted the mapColoring branch June 25, 2017 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants