Inspired by old code golf challenges and the latest TIS-100 game. Plus in part of the work for the upcoming demoscene courses. Interactive Computer Museum is presenting a monthly coding challenge.
- One can use any language they choose though assembly, basic, or ansi-c is prefered. Extra accepted languages will be announced on a per challange base.
- Scoring in no particular order is based on Lines of code in two classes: brevity vs elegance, Function jumps/Heap sizes, and Cycle count.
- In all code challenges, input and output can only be an integer with Min/Max for integers is -9999 through 99999. Unless stated otherwise.
- The winner will be picked the weekend before the next XM Core Conference Line Dial in/VCC Meetup towards the end of the month and announced doing the meetup. Prizes are always awarded at the end of the Meetup event.
- Challenge ideas are welcome and should be proposed on talk before becoming official.
- Code Submissions - Please paste the link into talk to get credit.
|This month's prize||Gift card to Starbucks|
Create three functions to determine if its input is either less than, equal to or greater than zero, respectively. The functions should return a 0 for false or a 1 for true. Each function takes an integer as input within the range of -2 through +2 inclusive. The functions should only use subtraction, addition and invert the sign, if possible.
- less_than_zero(2) should return 0 because 2 not less than zero
- equals_zero(0) should return 1 because 0 equals zero.
Bonus points for only using arithmetic.
Don't forget to make your submission runnable.
|Theme||Windows XP launched, Amiga DOS and workbench anyone?|
|This month's prize||Copy of RetroPi preconfigured for Amiga gaming|
|This month's prize||Steam Gift Card|