Subject: [SWIPL] help

From: "Jing Xu" <[email-masked]>
Date: Thu, 29 Mar 2001 16:34:06 -0600

I am learning prolog language. I have a project. Here is the request:

Use prolog language to draw a square grid of 50 by 50 locations to simulate a soccer field, place each team's soccer players in the own quarters at the start of game.  Show empty locations with 'o' and filled locations with 'a' for players of one team and with'b' for players of the other team.  The ball is shown with an '*'.  each player can see the entire field, can kick the ball, can drible the ball, and can pass the ball.  Devise strategies for individual players.Simulate the game situation and show the runs.  The user can freeze the game or change the position of the ball at will during the game. Instructions that result in leaving the grid or moving on a location already occupied should be avoided.

How to draw the grid? Can I use write statement? How to set the players on the field? Can I write like this (suppose we have two teams, one is A, the other is B):

start_pos(1A, 5, 5)

start_pos(2A, 5, 30)

.......

Does anyone have ideas?

Thank you

Jing

Get your FREE download of MSN Explorer at http://explorer.msn.com