All pastes #362790 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-19 01:36 UTC
rendered paste body
    public boolean GameTurn() {
        try {
            while (PlayerTable.CountNodes() != 0 && ComputerTable.CountNodes() != 0) {
            
            
                PlayerTurn();
                ComputerTurn();
                System.out.println(ComputerTable.PrintTable(ComputerTable.ViewOpponentsTable()));
                System.out.println(PlayerTable.PrintTable(PlayerTable.linkedTable));
                //System.out.println(ComputerTable.PrintTable(ComputerTable.linkedTable));
            }
 
            if (PlayerTable.CountNodes() == 0) {
                JOptionPane.showMessageDialog(null, "Warchief, we have lost our Navy");

            }
            else if (ComputerTable.CountNodes() == 0) {
                JOptionPane.showMessageDialog(null, "Warchief, we have won the battle!");
            }         
            return true;
        }
        catch (Exception e) {
            return false;
        }
    }