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
finished this project, please

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
>finished this project, please

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 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
> >finished this project, please

> 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
> finished this project, please

> Thank you very much
> Hau Chi

Do you need help with output formatting?

Mary



Wed, 28 May 2003 01:43:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Game Magazine for Shareware Game Developers.

2. Gaming Revolution: Games in Phones with Java: JavaOne Web Casts

3. Python in game development [fwd: best prog lang for games]

4. game theoretic semantics, dialogic logic & dialogue games

5. Gaming with the idea for games

6. makro for square root

7. macro for square root

8. Tiling a Rectangle with Squares in APL

9. Bug: #squared explain it returns exception

10. Tiling a square using APL?

11. Escaping Square Brackets

12. all strong disks outside the weak hallway were climbing beneath the hollow square

 

 
Powered by phpBB® Forum Software