I feel like it's time that this particular forum had an actually educational (but fun!) game, and as such I would like to present to everyone the concept of code golf. In a sentence, code golf is:
Wikipedia said:
In other words, whoever manages to write the shortest code will win the round! A few ground rules:
- "Short code" is determined by the number of characters not including whitespace (you can find a good character counter here!
- Your code must be functional, but readability is of course not necessary (kudos if you can have your code be both short and readable though)
- You do not necessarily need to subscribe to "good practice". Assume that your code will always be used correctly.
- Challenges will run infinitely or until it is agreed that the code cannot be shortened any further.
- Anyone can suggest a challenge, but see below for the guidelines that a challenge must subscribe to
- Stick to the spirit of the challenge!
- And most importantly, have fun and don't be ashamed of posting code that is longer than other's. Code golf is difficult, and it takes both time and practice to perfect the art. The best way to learn is by trying again and again even if you don't win each time. So give it your best shot!
- Challenges must be at least somewhat challenging. For example, an example of a bad challenge would be "make a program that prints hello world". There is a point where you literally cannot shorten code at all. An example of a good challenge would be "Write a button API that supports mouse click checking and custom colors".
- Challenges may have strictures. For example, you can say "Write a program that finds lua comments in text without using any string functions other than string.find".
- Any number of challenges can run at the same time! Present your challenge, and I'll add it to my main post ASAP as long as it subscribes to these guidelines.
As of right now, I want to try and keep challenges Lua based. If we find it difficult to shorten code much, I will allow more languages. However, Lua based challenges allows everyone to participate and not just those who have a degree in computer science or a lot of time to learn new languages on their handsopen- I've decided to open up challenges to new languages. This will, of course, not apply to those challenges which have already been issued specific to ComputerCraft and you may specify that a challenge should be language specific.
- Challenges can and will be run in Minecraft on the specified type of Computer (Turtle challenges are allowed!).
- If you start a challenge, please do your best to keep track of current best "score". This isn't necessarily required, but it would certainly help me out.
Current Challenges:
Good luck!
Edited by Bubba, 15 November 2013 - 11:04 AM.