There is a chess fever at my school. we are using drupal 6. Can anyone port this module, this would be perfect for my school.
If i knew how to do it I'll do it but I don't :-(

CommentFileSizeAuthor
#11 chess-6.x.1.x-dev.tar_.gz75.49 KBMGN
#7 chess_6.x_port.diff69.43 KBMGN

Comments

dariosantacruz’s picture

Title: the isn't a 6.x release yet? » there isn't a 6.x release yet?
EoinBailey’s picture

I don't use Drupal 6 yet myself, once there is a version working for Drupal 5 I'll look into moving to 6.

Babalu’s picture

subscribe

EoinBailey’s picture

Version: 5.x-0.1-beta1 » 5.x-0.08
Assigned: Unassigned » EoinBailey

I have a Drupal 6 installation now (like drupal.org my main site is still Drupal5 though, need project and issue tracking to update)

Once the Drupal 5 version is fairly feature complete I'll port to Drupal 6. I estimate I should have features complete in around a month, but work is crazy at the moment, and the module is one of several projects I'm working on outside of work, so be kind if it takes me a little longer!

If you want to help, here are some modules that help with porting between releases of Drupal:

http://drupal.org/project/deadwood
http://drupal.org/project/coder

And some documentation:

http://drupal.org/node/114774
http://drupal.org/node/144132

expatme’s picture

+1 not yet?

MGN’s picture

I just about have a 6.x port of chess ready. I need to check to make sure that I got the database schema correct, since the 'CHARACTER SET binary' commands don't translate directly. Once I've got it working I'll also have some suggestions for streamlining the code (and possibly the tables/sql). Just realized I started it from 5.x-0.09 and didn't see the 0.1-beta version, so I'll have to go back and see what else needs to be modified. Still should only take a day or so.

@Baileye, I assume you would you like a patch against the 5.x-0.1-beta version? If not, let me know what you would prefer.

EDIT: Nevermind, I see the numbering is just a little strange. looks like 0.09 is the most recent version after all...

MGN’s picture

Title: there isn't a 6.x release yet? » Port Chess to Drupal 6
StatusFileSize
new69.43 KB

Attached is a patch for a 6.x version of chess. It was made against chess 5.x-0.09.

While the functionality is largely the same, I (think I) fixed and added a few things along the way:
* check and checkmate checkboxes display user input correctly
* added a delete own chess permission
* Delete all the moves from {chess_games} associated with a node upon deletion
* Undo last move appears to work correctly now
* Streamlined code in column conversion and calculation of square colour
* etc.

Note the database field names have not changed, but several field types have changed in the transition to the D6 database schema. I've tried to keep it as close to the original structure, but its different. This also necessitated a couple of additional functions to interface with the modified database structure.

In the end, it seems to work so I guess that good! There isn't an upgrade path from 5.x to 6.x now, but given how early this is in development, I am not sure it matters.

The patch modifies 5 files from the 5.x-0.09 chess module. I'll be happy to help maintain and further develop the 6.x module if there is interest.

Thanks to Baileye for a fun module!

MGN’s picture

Status: Patch (to be ported) » Needs review
Johnnyk’s picture

I would love to see a port to Drupal 6!

Cannot apply patch properly - mainly because I'm dumb and stuck with windows here. I'll try tomorrow at work with linux - should work out well.

Thank you for your patch.

kenorb’s picture

Dump into zip, please:)

MGN’s picture

StatusFileSize
new75.49 KB

Here is the zip of the 6.x.1.x port of chess. It is definitely a work in progress, but may be a little further along than 5.x.0.09 is right now. I started evaluating legal moves, and was going to have the program notify when placed in check (right now the players have to do this). You can play chess with it now, but there is much much more to improve on...

I can help develop it further and support this port, but I have a few other projects which will get most of my attention. So don't expect rapid responses on this...project (unless other developers want to contribute...hint..hint...)

kenorb’s picture

MGN: Thank you:)

EoinBailey’s picture

Sorry I haven't been working on this the past few weeks, I've been out of the country, and now I'm back I'm catching up on my paid work!!

I'll get back on top of this soon I hope, I'm clearing some items off my agenda right now!

Johnnyk’s picture

If there is anything I can do - tell me

I'm currently installing your Zip at my place - and trying to play some chess ;)

Thumbs Up!

MGN’s picture

Baileye has a roadmap for the module in the README file:

Future Versions:
- display captured pieces
- replay all previous moves
- option to show a second block, that shows the previous state (state before the current move)
- enable queening
- verify moves (only allow legal moves) - not sure about this, standard chess rules don't enforce a 'legal move' system, it is up to the players to verify moves.

I guess I would add 'enable castling' and 'En Passant' moves to the list.

I started working on the verify moves part. I agree its up to players to verify moves, but in working with the UI on a small block with rank and file labels not perfectly aligned etc. etc. verifying moves can prevent mistakes that would be less likely with a real board in front of you... Plus, for those who might be learning the game, it can help when the system tells you that a move is illegal...the only problem is having to program the legal moves. But that is mostly done now except for castling, and En Passant.

I was going to begin the code to manage castling by checking when the player tries to move (an unmoved) king two squares along the rank...checking all the conditions required to allow the move, and then finally changing the board state of the king and rook appropriately.

Otherwise you can look for TODO's in the code and perhaps Baileye could prioritize the Roadmap, providing programming tasks in the issue queue so we can better help.

MGN’s picture

Status: Needs review » Fixed

I just uploaded the Drupal 6 port and released a development version for testing. I consider it stable enough to install and play on a non-production site, and I anticipate quite a few changes before a stable release is available. If you would like to test it out, please provide bug reports, feature requests, and other support questions on the issue queue.

kenorb’s picture

Status: Fixed » Reviewed & tested by the community

It's ready to commit.

expatme’s picture

any AI or anything? or is it purely human-human matchup?

MGN’s picture

Purely human-human matchup, the best kind of game.

MGN’s picture

Version: 5.x-0.08 » 6.x-1.x-dev
Assigned: EoinBailey » MGN
Status: Reviewed & tested by the community » Fixed

Marking this as fixed, now that we have the 6.x development branch and release node established.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.