Graphic interface for the game Breakthrough developed in PROLOG by Pedro Castro. The communication between languages was achieved through sockets. The graphic interface is a WebGL based software using JavaScript and XML for scene definition and rendering.
A player has a golden fleet which includes the red ship and twelve guards. The objective of this player is to avoid capture whilst he/she conducts the red ship towards the end of the board. The other player has a silver fleet of 20 ships and his/her objective is to capture the red ship. Each player can move a piece on the horizontal or vertical direction. Each move has a cost depending on the executed movement. For example, moving the red ship has the maximum cost which is 2. At the start of the game, each player has 2 move points as well as 1 capture point to spend. A simple movement has the cost of 1.
The interface allows costumization of some game options listed below.
- UNDO
- to undo de move
- THEME
- to chose the theme
- LEVEL
- two difficulties are available (hard and random)
- GAME MODE
- there are 3 game modes (HumanvsHuman/HumanvsBot/BotvsBot)
- ON/OFF
- play with the lights
In order to have the system running on your local machine for development and testing purposes see the notes below.
To run the simulation you must have the following software:
- SICStus Prolog (take into consideration that this software needs a license) - to run the game's logic in prolog
- Mongoose - web server to connect - Save the .exe file in your project folder
To get the game up and running follow these steps:
1. Open SICStus console
2. Go to File->Consult
3. Navigate to the folder reader\prolog and select the file server.pl
4. Write server. on the console (the point is necessary)
5. Execute mongoose and navigate to the reader folder
- Inês Santos - IneSantos
- Filipa Ramos - FilipaRamos
- All the rights of the prolog code belong to Pedro Castro.