The biggest problem is creating the AI.
The most common way to create a chess AI is by using minimax game trees with alpha-beta pruning.
There is no easy way to implement this with events and performance is a big issue.
The slowness of Ruby is also of consideration. It might so slow that creating a solid chess AI is infeasible.
It should be possible to create a chess AI strong enough to beat the average person.
Creating the chess AI is significantly easier with scripting than with eventing. The AI should most definitely be scripted
As for the rules of chess itself. I would personally prefer scripting them. The solution would be more elegant and structures that would ease the creation are already implemented. I think that the rules could be evented fairly nice. Nice enough that a strong eventer/weak scripter could get a better result by eventing the rules. (Yes, this is not the case with the AI)
So far I have only discussed the functionality (the behind-the-scene stuff) where one part should definitely be scripted and the other preferable be scripted, but what about the visualization?
This really depends on how you want it to work out in the game.
I would in most situations prefer the pieces being events so the mapper easily can move them around and arrange them accordingly.
Naturally you would have to think about communication between the various parts. It could be an event which goes like this:
@> Call Common Event: PlayerInput
@> Script: $chess.compute_input(1)
@> Script: $chess.process_ai
@> Script: $chess.compute_input(2)
Where the common event gets the response from what the player wants and stores it. Could be in a variable, could be through the script.
The $chess.compute_input(1) changes the chess accordingly to the player 1 input while making sure all rules are withheld.
$chess.process_ai process the AI and stores the choice in the same way the PlayerInput common event does.
The $chess.compute_input(2) changes the chess accordingly to the player 2 input while making sure all rules are withheld. (Yes, this would support 2 players with a simple change. Call Common Event: PlayerInput2 instead of $chess.process_ai)
This is just an example and a sort of pseudo-event code.
I hope I didn't totally confuse you but instead managed to highlight certain aspects of what you want.
P.s. I assumed that you wanted a general applicable framework. If you only want a few special scenarios the situation might be different.
*hugs*
- Zeriab