# Announcing the CodeGolf.SE Second Periodic Premier Programming Puzzle Push

## Whereas

• The site has suffered from low traffic for weeks
• We've been in beta for 271 days and our numbers are marginal
• Too many recent question have been both too easy and poorly specified
• Users have noted that we don't hve what it takes to get out of beta

we are seeking users willing to commit to improving the site.

1. To write one (1) really good programming puzzle of any kind and post it to the site sometime in the next two (2) weeks.
2. To answer at least two of these puzzles within one (1) week of their posting with a completely compliant, well written answer.
3. To vote (up or down) on at least four (4) of these questions, and if voting down to truthfully and tactfully explain why.
4. To vote (up or down) on at least eight (8) answers to these questions, and if voting down to truthfully and tactfully explain why.

In addition to the existing puzzle lab chat and the meta sandbox for questions, the answers to this post can serve as a place for vetting proposed questions and coordinating activities related to The Push.

Per out practice during the first Push, puzzles submitted as part of this event may (should?) be marked "2P5" if they have been discussed in the above places to insure high quality.

• I noticed this is a few months old and from before I began frequenting this SE site. Has any good come of it? Was there a bump in overall site usage? – Gaffi Mar 19 '12 at 20:02
• @Gaffi: No. The first one was fairly successful, but utterly failed to recruit any interest this time around. I'd go so far to say that when we do have some interest we'll try the and push again and pretend this one never happened... – dmckee --- ex-moderator kitten Mar 19 '12 at 20:47
• Well, May is right around the corner. ;-) – Gaffi Mar 19 '12 at 20:50

This is my first attempt at writing a question:

## Snake Console Game, Code Golf

Objective: To recreate the classic game of snake, in the console using a language of your choice.

Rules: The console should be the standard console size of your operating system(80x25 on windows).

Standard libraries only.

Input will be delivered using the arrow keys and will move the snakes head in that direction.

The snake should move in the direction it is facing until the user changes that direction.

The snake should not be able to turn 180 degrees in one motion.

When game over the program will end.

Game over is defined as the snake hitting the wall(edge of the console) of the console or itself.

The game will refresh at least twice a second and at most 20 times a second(this won't actually be measured, just don't make it ridiculously fast or slow).

The snake will start with a length of 3 and may start anywhere on screen (as long as it is not gameover in 2 turns without pushing any buttons).

Each part of the snakes body should be represented by an x.

An 'O' will appear randomly somewhere within the console window(not within the snakes body), when the snakes head touches this, it will become one piece longer(from the next refresh onwards). The snake should not stop when it hits the O it should continue through e.g:

1.

xxx O


2.

 xxxO


3.

 xxxx


4.

  xxxx


I will test the game up to about the snake being 10-15 in length, though it should theoretically be able to be played until the snake fills the console.

Winner is the program with the lowest number of characters, with at least one upvote.(I won't be able to test every operating system/language so I'm relying on an upvote meaning it is good, is this acceptable?)

Also it is not required to draw the very bottom right character in the console, though the O and the snake may still occupy that space

• The console should be the standard console size of your operating system(80x25 on windows). I don't think my OS has a standard console size (and I think the only reason Windows does is because cmd.exe is crap). Standard libraries only. And I don't think the majority of the languages I use have standard libraries which support this kind of thing - it would have to use VT100 escape sequences and hope that the player is using a suitable terminal emulator. – Peter Taylor Oct 30 '11 at 7:53