项目作者: tom-weatherhead

项目描述 :
A rudimentary chess game application with a command-line interface. Written in C.
高级语言: C
项目地址: git://github.com/tom-weatherhead/pdchess1.git
创建时间: 2020-06-14T02:39:53Z
项目社区:https://github.com/tom-weatherhead/pdchess1

开源协议:MIT License

下载




pdchess1

pdchess1 : Portable Didactic Chess, incarnation number 1.

A rudimentary chess application with a command-line interface.

build status
latest tag
watchers
stars
forks
repo dependents
pkg dependents
commits
last commit
license
FOSSA Status

Building pdchess1

gcc must be present in order to build the project.

If make is present, it can be used to help build the project:

  1. $ make
  2. $ ./pdchess

If make is absent, the project can be built using gcc alone:

  1. $ ./build.sh
  2. $ ./pdchess

Playing pdchess1

A fairly standard command syntax is used to specify moves; e.g.:

  • e2 e4 : An initial pawn move by White
  • g8 f6 : An initial knight move by Black
  • O-O : Castle on the kingside
  • O-O-O : Castle on the queenside

  • :? : Help

  • :q : Quit

Example

The beginning of a sample run involving the Sicilian Defence:

  1. Game or study? (g/s): g
  2. White: human or computer (h/c): h
  3. Black: human or computer (h/c): c
  4. Max search depth for Black (1-25): 5
  5. Extended max search depth for Black (5-25): 5
  6. Resign threshold (3-100): 10
  7. rnbqkbnr
  8. pppppppp
  9. -+-+-+-+
  10. +-+-+-+-
  11. -+-+-+-+
  12. +-+-+-+-
  13. PPPPPPPP
  14. RNBQKBNR
  15. Move #1
  16. White: e2 e4
  17. Matching move in book...
  18. rnbqkbnr
  19. pppppppp
  20. -+-+-+-+
  21. +-+-+-+-
  22. -+-+P+-+
  23. +-+-+-+-
  24. PPPP-PPP
  25. RNBQKBNR
  26. Move #1
  27. Black: Working...
  28. Using opening book...
  29. Black: c7 c5
  30. rnbqkbnr
  31. pp+ppppp
  32. -+-+-+-+
  33. +-p-+-+-
  34. -+-+P+-+
  35. +-+-+-+-
  36. PPPP-PPP
  37. RNBQKBNR
  38. Move #2
  39. White: ...

History

  • I witnessed the University of Waterloo host a tournament of Othello (Reversi)-playing programs in 1992; these programs played each other by sending game data over the Internet.
  • After creating my own rudimentary Othello-playing program in C, I chose chess as the next problem domain to tackle. The result was incarnation number 1 of pdchess, which was written in C in 1993. I began the project during my university exams in April. This version had a console interface. I started developing it on the univerity’s Unix computers, then e-mailed the source code to my e-mail address at Digital Equipment of Canada in Ottawa, where I worked during the summer of 1993. At Digital, I ported the code to compile and run on the VAX/VMS operating system, and I continued development. In August 1993, I e-mailed the source code back to Waterloo. Just before finishing my final term in April 1994, I copied the source code to a 3.5-inch floppy and took it with me.
  • During the summer of 1994, I modified the code to work on my brand-new computer (an Intel 80486SX PC clone running Windows 3.1, with 640 KB + 3072 KB of RAM and a 360 MB hard drive, plus 3.5-inch and 5.25-inch floppy drives) via Borland Turbo C++ 3.1. I created a GUI for pdchess using Turbo C++’s OWL (Object Windows Library) framework. (OWL was analogous to Microsoft’s MFC.)
  • Incarnation number 2 of pdchess was written in C++ in 2002, after I had read Bjarne Stroustrup’s book on the language.
  • Incarnation number 3 of pdchess was written in Typescript in Beijing, China in February and March 2020, during the COVID-19 coronavirus pandemic.
  • pdchess is also known to some as ‘partly done chess’. :-)

License

MIT