Square Game
Author Message
Square Game

Hi,

I'm a new user for prolog, now i got a project to do, but i'm not sure how
to do it, can someone help me please?

The project is write a game called "Square". In the game, there'll be a 5x5
grid of points(each idicated by a '+'). the players in the game take it to
select a point on the grid(only the point that have not been previously
selected by either player in the game so far). The object of the game is to
try to be the first to complete the four corner of the square of any size on
the grid. The points selected by each player are idicated by a symbol('O'
for one player and "X" for computer move). So can anybody help me to

Thank you very much
Hau Chi

Fri, 16 May 2003 03:00:00 GMT
Square Game

Quote:
>I'm a new user for prolog, now i got a project to do, but i'm not sure how
>to do it, can someone help me please?

>The project is write a game called "Square". In the game, there'll be a 5x5
>grid of points(each idicated by a '+'). the players in the game take it to
>select a point on the grid(only the point that have not been previously
>selected by either player in the game so far). The object of the game is to
>try to be the first to complete the four corner of the square of any size on
>the grid. The points selected by each player are idicated by a symbol('O'
>for one player and "X" for computer move). So can anybody help me to

Start by designing a board representation.

Then write code to display board positions on the screen.

Then write a program that plays legally (though no doubt extremely
badly) against a human who inputs moves with the keyboard.

Nick
--

Sat, 17 May 2003 08:15:51 GMT
Square Game
I agree with Nick except I'd skip display until last and intermingle the
other steps(perhaps I should have said disagree :-). The effect the
representation will have on the program is beyond measure. Quick question
though, do rotations count? i.e. Are these valid squares:
+X+
X+X
+X+
----
+X++
+++X
X+++
++X+

Quote:

> >I'm a new user for prolog, now i got a project to do, but i'm not sure
how
> >to do it, can someone help me please?

> >The project is write a game called "Square". In the game, there'll be a
5x5
> >grid of points(each idicated by a '+'). the players in the game take it
to
> >select a point on the grid(only the point that have not been previously
> >selected by either player in the game so far). The object of the game is
to
> >try to be the first to complete the four corner of the square of any size
on
> >the grid. The points selected by each player are idicated by a symbol('O'
> >for one player and "X" for computer move). So can anybody help me to

> Start by designing a board representation.

> Then write code to display board positions on the screen.

> Then write a program that plays legally (though no doubt extremely
> badly) against a human who inputs moves with the keyboard.

> Then improve your program's play.

> Nick
> --

Sat, 17 May 2003 03:00:00 GMT
Square Game

Quote:

> Hi,

> I'm a new user for prolog, now i got a project to do, but i'm not sure how
> to do it, can someone help me please?

> The project is write a game called "Square". In the game, there'll be a 5x5
> grid of points(each idicated by a '+'). the players in the game take it to
> select a point on the grid(only the point that have not been previously
> selected by either player in the game so far). The object of the game is to
> try to be the first to complete the four corner of the square of any size on
> the grid. The points selected by each player are idicated by a symbol('O'
> for one player and "X" for computer move). So can anybody help me to

> Thank you very much
> Hau Chi

Do you need help with output formatting?

Mary

Wed, 28 May 2003 01:43:59 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages