How to configure simple game AI setting with jtable

Posted by Asgard on Programmers See other posts from Programmers or by Asgard
Published on 2012-06-19T18:35:17Z Indexed on 2012/06/19 21:23 UTC
Read the original article Hit count: 187

Filed under:

I'm developing an application that has methods of this kind:

attackIfIsFar();
protectIfIsNear();
helpAfterDeadOf();
helpBeforeAttackOf();

etc.

The initialization of my application for n players is something like

player1.attackIfIsFar(player2);
player2.protectIfIsNear(player4);
player3.helpAfterDeadOf(player1);
player4.helpBeforeAttackOf(player3);

etc.

I don't know how to configure a jtable that that can allow me to set the equivalent of this code-block

In others words I need simply a way to create a jtable with 3 column and n row, were I can set in the column 1 and 3, the player, and in the central column one of the available methods that each player on the column 1 must invoke on each player of column 3

© Programmers or respective owner

Related posts about java