Catalog · How the catalog works
Guess-color-delphi7
Delphi / Object Pascal + VCL UDP
- ★ 2 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
GUESS_COLOR
A two-player color-guessing game written in Delphi 7 using Indy UDP components (TIdUDPClient / TIdUDPServer). Two peer applications exchange color pairs over UDP and each tries to guess the other's secret combination.
Structure
GUESS_COLOR/
????????? UDPC/ # Peer A ??? listens on 4000, sends to 5000
????????? UDPS/ # Peer B ??? listens on 5000, sends to 4000
????????? GUESS_COLOR/ # Duplicate copy of UDPC / UDPSPorts
| App | Listens (Server) | Sends to (Client) |
|---|---|---|
| UDPC | 4000 |
127.0.0.1:5000 |
| UDPS | 5000 |
127.0.0.1:4000 |
Edit TIdUDPClient.Host in Unit1.dfm to play across machines.
How to Play
- Drag any of the 4 source colors (
Aqua,Yellow,Red,Teal) onto your two "secret" circles. - Press Send — the pair is transmitted as
color1,color2over UDP. - Drag your guess onto the answer circles.
- Press Guess — a dialog reports how many of the two slots match.
Build & Run
Requirements: Borland Delphi 7 with bundled Indy components.
- Run prebuilt binaries: launch
UDPC/Project1.exeandUDPS/Project1.exe. - Or open
Project1.dprin Delphi 7 and press F9.
Each peer binds a fixed port, so only one instance per app per machine.
Notes
*.~dpr/*.~pas/*.~dfmfiles are Delphi auto-backups and can be deleted.- Source strings use Big5 encoding; expect mojibake when opened as UTF-8.

