11
\$\begingroup\$

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.

Your mission

should you chose to accept it—is

  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.

\$\endgroup\$
3
  • \$\begingroup\$ 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? \$\endgroup\$
    – Gaffi
    Mar 19, 2012 at 20:02
  • \$\begingroup\$ @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... \$\endgroup\$ Mar 19, 2012 at 20:47
  • \$\begingroup\$ Well, May is right around the corner. ;-) \$\endgroup\$
    – Gaffi
    Mar 19, 2012 at 20:50

1 Answer 1

3
\$\begingroup\$

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.

http://en.wikipedia.org/wiki/Snake_(video_game)

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

Questions/comments?

I have done this in a couple of hours in c++(semi-golfed) in about a hundred lines or so, so it shouldn't be too hard.

Also I'm unsure about whether to make it windows only, makes it easier to assess and evens the field a bit but probably leaves a lot of people unable to participate.

Are interactive code golfs ok, not seen too many of them, is it because they are hard to judge?

\$\endgroup\$
4
  • \$\begingroup\$ Examples of existing interactive puzzles: codegolf.stackexchange.com/questions/1054/… codegolf.stackexchange.com/q/375/78. There are not many of them and haven't been particularly popular. Note that part of the engine for this could be very similar to that needed for mellamokb's TRON proposal (which may be a good thing if it encourages people to solve them both). \$\endgroup\$ Oct 29, 2011 at 17:10
  • \$\begingroup\$ 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. \$\endgroup\$ Oct 30, 2011 at 7:53
  • \$\begingroup\$ Thanks Peter, tbh that was a pretty stupid line about standard libraries, even I'm using conio.h which is compiler specific. You're right about the lack of support though in most languages, I hadn't really thought about that. I'm not sure if there is anything that can be done about it. There seems to be too many variables(os, compiler, terminal, terminal size) that make this unworkable, I'm glad I asked here first. \$\endgroup\$ Oct 30, 2011 at 13:50
  • \$\begingroup\$ I like this idea. You could just specify the size to remove ambiguity. \$\endgroup\$ Nov 10, 2011 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .