tresinformal / drakkar

The tresinformal video game called 'Drakkar'
GNU General Public License v3.0
11 stars 4 forks source link

Make ready-made black and white colors #460

Closed TheoPannetier closed 1 year ago

TheoPannetier commented 2 years ago

The project currently has three functions to call read-made colors, namely:

It would be nice to also be able to call ready-made black and white colors. starting from the functions above, make create_black _color() and create_white_color().

//#define FIX_ISSUE_460
#ifdef FIX_ISSUE_460
  // #460 Ready-made black and white colors are available
  {
    const color black = create_black_color();
    assert(get_redness(black) == 255);
    assert(get_greenness(black) == 255);
    assert(get_blueness(black) == 255);
  }
  {
    const color white = create_white_color();
    assert(get_redness(white) == 0);
    assert(get_greenness(white) == 0);
    assert(get_blueness(white) == 0);
  }
#endif // FIX_ISSUE_460
Luxwor commented 1 year ago

Added black and white color