Permalink
Browse files

initial commit

git-svn-id: http://svn.php.net/repository/pear/packages/Games_Chess/trunk@142347 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
Greg Beaver
Greg Beaver committed Oct 13, 2003
1 parent 5890638 commit 3b7772e5f6046f34cee42d55d06f48aea326dd23
Showing with 11,628 additions and 0 deletions.
  1. +2,173 −0 Chess.php
  2. +914 −0 Chess/Standard.php
  3. +69 −0 LICENSE
  4. +381 −0 examples/HTMLChess.php
  5. BIN examples/images/B.gif
  6. BIN examples/images/K.gif
  7. BIN examples/images/N.gif
  8. BIN examples/images/P.gif
  9. BIN examples/images/Q.gif
  10. BIN examples/images/R.gif
  11. BIN examples/images/blank.gif
  12. BIN examples/images/dark/b.gif
  13. BIN examples/images/dark/blank.gif
  14. BIN examples/images/dark/k.gif
  15. BIN examples/images/dark/n.gif
  16. BIN examples/images/dark/p.gif
  17. BIN examples/images/dark/q.gif
  18. BIN examples/images/dark/r.gif
  19. +172 −0 package.xml
  20. +509 −0 tests/Games_Chess_TestCase_addPiece.php
  21. +79 −0 tests/Games_Chess_TestCase_bugEnPassant.php
  22. +97 −0 tests/Games_Chess_TestCase_bugdxc3.php
  23. +181 −0 tests/Games_Chess_TestCase_bugpromotion.php
  24. +572 −0 tests/Games_Chess_TestCase_convertSquareToSAN.php
  25. +118 −0 tests/Games_Chess_TestCase_getAllPieceLocations.php
  26. +206 −0 tests/Games_Chess_TestCase_getAllPieceSquares.php
  27. +138 −0 tests/Games_Chess_TestCase_getDiagonal.php
  28. +87 −0 tests/Games_Chess_TestCase_getDiagonalColor.php
  29. +110 −0 tests/Games_Chess_TestCase_getKingSquares.php
  30. +142 −0 tests/Games_Chess_TestCase_getKnightSquares.php
  31. +331 −0 tests/Games_Chess_TestCase_getPathToKing.php
  32. +92 −0 tests/Games_Chess_TestCase_getPieceTypes.php
  33. +150 −0 tests/Games_Chess_TestCase_getPossibleBishopMoves.php
  34. +176 −0 tests/Games_Chess_TestCase_getPossibleChecks.php
  35. +151 −0 tests/Games_Chess_TestCase_getPossibleKingMoves.php
  36. +147 −0 tests/Games_Chess_TestCase_getPossibleKnightMoves.php
  37. +194 −0 tests/Games_Chess_TestCase_getPossibleMoves.php
  38. +307 −0 tests/Games_Chess_TestCase_getPossiblePawnMoves.php
  39. +155 −0 tests/Games_Chess_TestCase_getPossibleQueenMoves.php
  40. +151 −0 tests/Games_Chess_TestCase_getPossibleRookMoves.php
  41. +143 −0 tests/Games_Chess_TestCase_getRookSquares.php
  42. +237 −0 tests/Games_Chess_TestCase_getSquareFromParsedMove.php
  43. +196 −0 tests/Games_Chess_TestCase_inBasicDraw.php
  44. +123 −0 tests/Games_Chess_TestCase_inCheck.php
  45. +164 −0 tests/Games_Chess_TestCase_inCheckMate.php
  46. +153 −0 tests/Games_Chess_TestCase_inStaleMate.php
  47. +137 −0 tests/Games_Chess_TestCase_interposeOrCapture.php
  48. +104 −0 tests/Games_Chess_TestCase_moveAlgebraic.php
  49. +109 −0 tests/Games_Chess_TestCase_movePiece.php
  50. +484 −0 tests/Games_Chess_TestCase_moveSAN.php
  51. +454 −0 tests/Games_Chess_TestCase_parseFen.php
  52. +427 −0 tests/Games_Chess_TestCase_parseMove.php
  53. +101 −0 tests/Games_Chess_TestCase_squareToPiece.php
  54. +708 −0 tests/Games_Chess_TestCase_validMove.php
  55. +64 −0 tests/HTML_TestListener.php
  56. +55 −0 tests/TestUnit.php
  57. +65 −0 tests/stylesheet.css
  58. +102 −0 tests/testsuite.php
View
2,173 Chess.php

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
69 LICENSE
@@ -0,0 +1,69 @@
+--------------------------------------------------------------------
+ The PHP License, version 3.0
+Copyright (c) 1999 - 2003 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. The name "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP, freely available from
+ <http://www.php.net/>".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see <http://www.php.net>.
+
+This product includes the Zend Engine, freely available at
+<http://www.zend.com>.
+
Oops, something went wrong.

0 comments on commit 3b7772e

Please sign in to comment.