[Home]MatchIsOver

Robo Home | Changes | Preferences | AllPages

How do I know the match and/or round is over?

/Discussion

Solution

public void onDeath(DeathEvent e)   { gameOver(); }
public void onWin(WinEvent e)       { gameOver(); }

public void gameOver() {

    if (myRobot.getRoundNum() == myRobot.getNumRounds() - 1) {
        //  This is the end, my friend.
    }
}
-- Ray Vermette

Anyone that has peeked at the code of TheArtOfWar will recognize that. =) -- PEZ


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited March 3, 2003 23:09 EST by PEZ (diff)
Search: