Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lisp IDE Request

Name: Anonymous 2013-03-08 18:43

Is there a Lisp IDE, which would to use GUI editable blocks to visualize SEXPs?

I.e. pushing +/- would fold/unfold subtree, while insert/del would add/remove an element to underlying form, and pressing enter would edit it.

And cursor arrow would be bound not to chars, but to the SEXP elements themselves. Just imagine how many keystrokes it will save you!

I know there are Emacs hacks, but they are completely foreign and inconvenient, compared to real IDE.

Name: Anonymous 2013-03-10 22:31

hi,

I need help making a c++ program for school.

The program deals with the game connect 4(http://en.wikipedia.org/wiki/Connect_Four). The game consists of a grid : 3 rows x 3 columns (or 9 cells) :
To identify each cell, we index them : Cell 1 is at the bottom-left
while cell 9 is at the top-right of the grid. Use only arrays of one
dimension.
There are two players (indexed by 1 and 2) who take turn to
drop one token (identified by the user index) in either column 1,
2 or 3, with the objective to align 3 of his/her tokens in a row,
in a column or in a diagonal. Both players are humans and the program will request the players to input the column where they wish to drop the token.

Implement your program with one input to get the column index where the player will drop the token. Your program must check that the selected column is not full; as long as the player keeps selecting a column that is full, the program must ask the same player for another input. After getting a valid column index, have your program update the state of the grid, display its content and determine if the game is over or not. If the game is not over, then it is the turn of the other player. And so on.
Here are (some of ) the tasks your flowchart needs to implement (you may add others) :
a) how does the program determine that the game is over (either all the 9 cells are filled and
there is no winner or one of the player aligns 3 tokens in a row, a column or a diagonal) ?
b) The players take turn to drop their tokens. How does your program determine who is the
next player to play and how does it identify the tokens (from player 1 or from player 2) in the grid ?
c) If a column is full (ie. 3 tokens are already in the that column), no player can drop another
token in that column. How does your program identify the column(s) where the next player can still
drop his/her token ?

I do know how to generate a random number between 1,2, and 3:

#include <cstdlib>
#include <iostream>
#include <time.h>
using namespace std;
int main(int argc, char *argv[])
{
srand ( time(NULL) );
int code = rand()%3 +1; // code will be 1, 2 or 3
cout << code<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}

Thank you very much :)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List