Share Tips, Code Samples, etc. with the Visual Prolog community.
Harrison Pratt
VIP Member
Posts: 353
Joined: 5 Nov 2000 0:01

TicTacToe - new VIP user hints (GDI+, 2-D array, etc.)

Unread post by Harrison Pratt »

I was testing the new VIP 9x installation and decided put together a tiny TicTacToe as a test project. Since it uses a number of common VIP constructs I decided to annotate it for new user users to browse to see how to do a few simple common tasks:

How to handle getting a return value from dialog.
GDI+ usage with dynamic scaling of window graphics on resizing of the window.
Use of 2-dimensional array (array2M) for handling game play.
Anonymous predicate usage.
Modify Messages window font and number of lines retained in buffer.
Pluralizing text messages

Search for "HOWTO" in the IDE to find the hints.

You can right-click a cell in the game to see how many different ways you can win using that particular cell.

I obviously have way too much time on my hands, but not so much that I want to work out how to make the computer play against a human ... yet. :wink:

You can find VIP 8x and 9x versions here: https://github.com/hwpratt/VisualPrologDemoProjectsHWP

I suggest downloading the appropriate ZIP file and expanding it into a project directory.
Post Reply