reset password
Author Message
BryanYeh
Posts: 38
Posted 11:31 Apr 21, 2014 |

It seems like I have to use the Scala IDE to add Scala Nature.

When I extend the class to SampleGamer, the class needs to be abstract. After adding the override/implement methods,(stateMachineSelectMove function was added) I had to change the style of coding to Scala. 

@Override
    public Move stateMachineSelectMove(long timeout)
            throws TransitionDefinitionException, MoveDefinitionException,
            GoalDefinitionException {
        // TODO Auto-generated method stub
        return null;
    }

to (not sure where to move/change the exceptions)

override def  stateMachineSelectMove(timeout: Long):Move 
            throws TransitionDefinitionException , MoveDefinitionException,
            GoalDefinitionException {
        // TODO Auto-generated method stub
        return null;
    }

What do I do with the exceptions?

rabbott
Posts: 1649
Posted 11:51 Apr 21, 2014 |

Right. You do have to use the Scala IDE to add Scala nature.  Regarding the exceptions, as far as I can tell it's ok just to leave them out.