text
stringlengths
14
410k
label
int32
0
9
@Override public List<Fornecedor> listAll() { Connection conn = null; PreparedStatement pstm = null; ResultSet rs = null; List<Fornecedor> fornecedores = new ArrayList<>(); try{ conn = ConnectionFactory.getConnection(); pstm = conn.prepareStatement(LIS...
3
@Override public void actionPerformed(ActionEvent e) { int decision = JOptionPane.showConfirmDialog( controller.getMainJFrame(), "Do you really want to exit?", "Exit the application", JOptionPane.YES_NO_OPTION ); if ( decision == JOptionPane.YES_OPTION ) { controller.getMainJFrame().dispose...
1
@Override public void paint(Graphics g){ super.paint(g); int env[][] = this.environment.getEnvironment(); g.setColor(Color.LIGHT_GRAY); g.drawLine(0, 0, 0, env[0].length * DY); g.drawLine(0, 0, env.length * DX, 0); for (int i = 0; i < env.length; i++){ g.drawLine((i + 1) * DX, 0, (i + 1) * DX, env...
8
public Program(String name) { this.name = name; }
0
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
@Override public Object stringToValue(String text) throws ParseException { return new Integer(Math.min(Math.max(Numbers.getLocalizedInteger(text, mMinValue <= 0 && mMaxValue >= 0 ? 0 : mMinValue), mMinValue), mMaxValue)); }
2
private int loadPtrOffset() throws ScriptException{ int ptr = data[programPointer++]&0xFF; if((ptr&0x80)==0){ switch((ptr>>5)&0x3){ case 1: return register[ptr & 0x1F]; case 2: return register[ptr & 0x1F]+loadPtrOffset(); case 3: return register[ptr & 0x1F]*loadPtrOffset(); default: t...
7
public void drawTool(Graphics g) { if (currentTool == null) return; currentTool.draw(g); }
1
public static void sort_names(String[] names) { Map<String, List<String>> map = new TreeMap<>(); for (String name : names) { String lastName = name.split("\\s")[1]; if(!map.containsKey(lastName)) { map.put(lastName, new ArrayList<String>()); } ...
4
public boolean checkPing(String ping){ if(lasping.equals(ping) || (":" + lasping).equals(ping)){ this.is_pinged = true; return true; } else { this.is_pinged = false; return false; } }
2
public void resetItems(int WriteFrame) { outStream.createFrameVarSizeWord(53); outStream.writeWord(WriteFrame); outStream.writeWord(playerItems.length); for (int i = 0; i < playerItems.length; i++) { if (playerItemsN[i] > 254) { outStream.writeByte(255); // item's stack count. if over 254, write by...
4
protected Stmt createUndefinedStore(final VarExpr target) { if (target.type().isReference()) { return new ExprStmt(new StoreExpr(target, new ConstantExpr(null, Type.OBJECT), target.type())); } if (target.type().isIntegral()) { return new ExprStmt(new StoreExpr(target, new ConstantExpr( new Intege...
5
private static String[][] HFSA(String[] input) { int NGramLength = input.length; //String[] transitions = {" ", ",COMMA", ".PERIOD", "?QMARK", "!EXCL"}; //Change space to null int numberOfTransitionsInString = input.length/2; int internalCounters[] = new int[numberOfTransitionsInString];...
6
RecordTypeNode recordType() { read(RECORD, "RECORD"); List<FieldListNode> fieldLists = new ArrayList<FieldListNode>(); FieldListNode node = fieldList(); if(node!=null) fieldLists.add(node); while (test(SEMICOLON)) { read(SEMICOLON,";"); node = fieldList(); if(node!=null) fieldLists.add(node); ...
3
@Override public void move() { if (alive) { if (stomache > 0) { addGlied(); stomache--; } super.move(); invertedBevoreMoves ++; } }
2
public int getGravityDelay() { if(frame == null) buildGUI(); return gravityDelay.getValue(); }
1
@Override public void setVisible(boolean visible) { if (visible) { setLocation(50, 50); } super.setVisible(visible); }
1
@Override public void beginDraggingFrame(JComponent f) { //System.out.println("beginDraggingFrame"); isDragging = true; super.beginDraggingFrame(f); }
0
public static Connection getConnection() throws SQLException { Connection c = DriverManager.getConnection(getJdbcString(), "linse", "linse"); return c; }
0
public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); String line = ""; HashMap<Integer, Character> hm2 = new HashMap<Integer, Character>(); int con = 1; ...
4
private void setPopupMenu(JComponent component){ final JPopupMenu popup = new JPopupMenu(); JMenuItem menuItemOk = new JMenuItem("Подтвердить заявку"); JMenuItem menuItemCancel = new JMenuItem("Отменить заявку"); popup.add(menuItemOk); popup.addSeparator(); popup.add...
1
public void setCtrEstado(String ctrEstado) { this.ctrEstado = ctrEstado; }
0
public String execute() throws Exception { int index = 1, i = 0; int item_index = new Integer(itemname); Object[] objects = null; List list = (List) this.getSession().get("itemNames"); Iterator iterator = list.iterator(); while (iterator.hasNext()){ objects = (Object[]) iterator.next(); if(it...
4
public void Decorate() { super.Decorate(); currentIcon = icons[0].getImage(); try { g = currentIcon.getGraphics(); } catch (NullPointerException e) { System.out.println("Could not get Graphics pointer to " + getClass() + " Image"); return; ...
5
public void executeQuery(String query) { boolean notRows = true; if (connection == null || statement == null) { System.err.println("There is no database to execute the query."); return; } try { /*gavarela: Innecesrio que imprima en la consola de Java System.out.println("JDBCAdapter:...
8
public boolean canRobotMove(Direction direction) { boolean result = true; /* Each case checks for 2 things: if the robot will move outside of the bounds * and if there is a rock in the robot's path. */ switch(direction) { case UP: result &= robot.getLocation().y > 0; result &= !rocks.contains(new Re...
4
@PostConstruct private void postConstruct() { log.warn("Database folder : " + path); try { provider = new MyTableProviderFactory().create(path); } catch (IOException e) { log.error("Cannot use directory! " + path + " " + e.toString()); } }
1
public void loadImage() { if (path == null) return; if (getWidth() <= 0 || getHeight() <= 0) return; // not ready yet ImageIcon tmpIcon = new ImageIcon(path); if (getLockRatio()) { float rx = (float) tmpIcon.getIconWidth() / (float) (getWidth() - 10); float ry = (float) tmpIcon.getIconHeight() / (fl...
7
@Override public void actionPerformed(ActionEvent e) { if(e.getSource() == exitMenuItem) { exit(); } else if(e.getSource() == configMenuItem) { //TODO } else if(e.getSource() == aboutMenuItem) { //TODO } }
3
public static String doubleToString(double d) { if (Double.isInfinite(d) || Double.isNaN(d)) { return "null"; } // Shave off trailing zeros and decimal point, if possible. String string = Double.toString(d); if (string.indexOf('.') > 0 && string.indexOf('e') < 0 ...
7
public static void main(String[] args) { double c1,c2,c3; int exp,ppt; double a,b,xr,fa,fb,error,fd,epsilon; double eaux=0; double cpt,cst; Scanner lector = new Scanner(System.in); System.out.println("Dame el coeficiente del termino cuadratico"); c1=1; System.out.println("Dame el exponente del te...
3
@Test public void dedup_whenInputContainsDuplicatedChars() { String word = "aaa"; assertEquals("[[a, a]]", combination.combine(word, 2).toString()); assertEquals("[[a, a, a], [a, a, b], [a, b, b], [b, b, b]]", combination.combine("ababbbba", 3).toString()); }
0
void setExampleWidgetPopupMenu() { Control[] controls = getExampleControls(); for (int i = 0; i < controls.length; i++) { final Control control = controls [i]; control.addListener(SWT.MenuDetect, new Listener() { public void handleEvent(Event event) { Menu menu = control.getMenu(); i...
5
public PrimitiveUndoableEditableChange(Node node, int oldState, int newState) { this.node = node; this.oldState = oldState; this.newState = newState; }
0
public int playHand() { //Card c1 = h1.player1play(); //Card c1 = h1.player1play(); Card c1 = ((Card)this.h1.p1Queue.dequeue()); Card c2 = ((Card)this.h1.p2Queue.dequeue()); int hw = 0; //System.out.println("hw: " + hw); if (console) { Syst...
7
public static ParameterContent parse(Class<?> parameter, Annotation[] annotationList) { ParameterContent pc = new ParameterContent(); pc.setType(parameter.getName()); for(Annotation annotation : annotationList) { // Jersey - @DefaultValue if(annotation instanceof DefaultValue) { DefaultValue dv = (Def...
9
@Override public boolean execute(CommandSender sender, String[] args) { if (args.length != 0) { return false; } else { if (!hasPermission(sender)) { sender.sendMessage(ChatColor.RED + "You do not have sufficient permissions to do that!"); return true; } sender.sendMessage(ChatColor.AQUA + "[Ge...
3
public synchronized void addReceivedPacketHistoryToOutgoingPacket(Packet packet) { if(packet != null) { packet.setLastReceivedSequenceNumber(lastReceivedPacketSequenceNumber); packet.setReceivedPacketHistory(receivedPacketHistoryInt); } }
1
public static JSONObject parseObject(ParseInfo info) throws Exception { if (info.peek() != '{') { giveup(info, "Failure to begin an object with a {"); } // if (info.peek() != '{') JSONObject obj = new JSONObject(); String start = info.info(); info.next(); info.skipWhitespace(); while ((!info.atEnd()) && (in...
7
public static Map<String, String> returnShipAdviceHeader(String identifier) { // Select the customer ID from the table and add to the map. Map<String, String> headerValues = new HashMap<String, String>(); if (conn == null) { getConnection(); } try { String...
8
@Override public int compareTo(AppWindow other) { if (this != other) { String title = getTitleForWindowMenu(); String otherTitle = other.getTitleForWindowMenu(); if (title != null) { if (otherTitle == null) { return 1; } return title.compareTo(otherTitle); } if (otherTitle != null) { ...
4
private final void sendResponse(HttpExchange exc, Response response) throws IOException { for (Map.Entry<String, List<String>> entry : response.getParams().entrySet()) { for (String value : entry.getValue()) { exc.getResponseHeaders().add(entry.getKey(), value); } ...
4
private String getByteRange() throws IOException { try { String[] splitOnConnection = requestArray[3].split("Connection:"); String[] splitOnBytes = splitOnConnection[0].split("bytes="); return splitOnBytes[1]; } catch (ArrayIndexOutOfBoundsException e){ return "No Range Given"; } ...
1
public char getCharSurroundedByWhitespace() { char alpha = 0; try { while (true) { int curr = reader.read(); if (curr < 0) break; char c = (char) curr; if (!Character.isWhitespace(c)) { al...
4
private boolean flipVertical(long binPosition, boolean goesDown){ boolean hasFlippableDisk = false; long searchPosition = binPosition; if(goesDown && (binPosition & 0x00000000000000FFl) == 0) searchPosition = binPosition >> 8; else if( !goesDown && (binPosition & 0xFF000000...
9
public ContainerListener onStart(ClientRequest cr) { return new SendPackageListener(); }
0
@Override public boolean isAControlledFollower(MOB invoker, MOB mob, Ability A) { if((mob==null)||(mob==invoker)||(!mob.isMonster())) return false; if(A==null) return mob.getStartRoom()==null; A = mob.fetchEffect(A.ID()); if(A==null) return false; if((A.invoker() == invoker)||(A.invoker()==null)) ...
7
public static void fillDatabase() { itemDatabase = new ArrayList<String>(); BufferedReader reader; try { reader = new BufferedReader(new FileReader(System.getProperty("resources") + "/database/items")); String line; while((line = reader.readLine()) != null) { String[] temp = line.split("...
5
public boolean compareType(GameMatter i){ switch (type){ case "sell": return i instanceof Sellable; case "key": return i instanceof Key; case "static": return i instanceof FurnitureStatic; case "knife": return i instanceof Knife; } return false; }
4
public static void main(String[] args) throws MalformedURLException { mainWindow = new windowManager("Demo", 100, 100, 640, 480); video = new videoSystem2D(mainWindow.getWidth(), mainWindow.getHeight()); keyboard = new keyboardSystem(); video.createImage(0, 0, 0, 50, 658, 512, "images/circle.png"); video....
5
@Basic @Column(name = "value") public String getValue() { return value; }
0
public void testRemoveManyWithNulling() { Table<Integer> buf=new Table<>(3, 10, 0); for(int i: Arrays.asList(1,2,3,4,5,6,7,9,10)) buf.add(i, i); List<Integer> list=buf.removeMany(true, 3); System.out.println("list = " + list); assert list != null && list.size() == 3; ...
7
private boolean mouseOverTopArrow(int mx, int my) { if (!isVisible) return false; if (mx < positionX || mx > positionX + width) return false; if (my < positionY || my > positionY + height) return false; return (my <= positionY + 16); }
5
public int GetTotalLeftAtBusStop() { //get person left at a stop return totalLeftAtBusStop; }
0
public int deleteValue(String key) throws IOException { if (!keyPointers.containsKey(key)) return 3; long position = keyPointers.get(key); int size = 0; RandomAccessFile data = new RandomAccessFile(dataStorage, "rw"); data.seek(position); char c; while...
4
private boolean check() { if (!isBST()) StdOut.println("Not in symmetric order"); if (!isSizeConsistent()) StdOut.println("Subtree counts not consistent"); if (!isRankConsistent()) StdOut.println("Ranks not consistent"); if (!is23()) StdOut...
9
public GuessTheNumberPlayer getPlayer(Position p) { GuessTheNumberPlayer g = null; for (GuessTheNumberPlayer guessTheNumberPlayer : players) { if(guessTheNumberPlayer.getPosition().equals(p)) { g = guessTheNumberPlayer; break; } } return g; }
2
protected void run() throws Exception { this.initializeOpenGL(); this.isRunning = true; this.initializeGame(); log("Game sucessfully initialized"); log("Entering game loop"); try { while (this.isRunning) { Display.sync(60); Display.update(); this.tick(); this.render(); } ...
2
public void setGameStart(Calendar newGameStart) { gameStart = newGameStart; }
0
public void checkFeatures() throws IOException { Reply reply = sendCommand(new Command(Command.FEAT)); reply.dumpReply(); if (ReplyCode.isPositiveCompletionReply(reply)) { List<String> lines = reply.getLines(); for (String s : lines) { if (s.indexOf(Command.SSCN) > -1) { setSscnSupport(true); ...
7
protected double meanOrMode(Instances instances, int[] instList, int attIndex) { double result, found; int[] counts; int numInst = instList.length; if (instances.attribute(attIndex).isNumeric()) { result = found = 0; for (int j = 0; j < numInst; j++) { Instance currInst = i...
7
public City_Graph(){ }
0
public static boolean findSubString(char[] subString, char[] parentString) { int indexOfSubString = 0; int solutionIndex = 0; for(int i=0; i<parentString.length; i++) { if(subString[indexOfSubString] == parentString[i]) { if(indexOfSubString == 0) { ...
7
ObjectLoader(GameMode class230, int i, boolean bool, IndexLoader class45, IndexLoader class45_29_) { aClass60_3350 = new Cache(64); ((ObjectLoader) this).aClass60_3360 = new Cache(500); ((ObjectLoader) this).aClass60_3361 = new Cache(30); ((ObjectLoader) this).aClass60_3362 = new Cache(50); do { try { ...
6
public void update_pf_moving() { if (path == null) return; if (JSBotUtils.isMoving()) return; if (path_step < path.size()) { if (myLastCoord.equals(path.get(path_step))) { path_moving = false; path_step++; } } i...
8
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { Player player = (Player) sender; if(commandLabel.equalsIgnoreCase("Pyro") && sender instanceof Player){ if (player.hasPermission("EasyPvpKits.Pyro")){ if (!plugin.kits.contains(player.getName())){ ItemStac...
7
public static void main(String[] args){ try{ BufferedReader in=null; if(args.length>0){ in = new BufferedReader(new FileReader(args[0])); } else{ in = new BufferedReader(new InputStreamReader(System.in)); } // BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ArrayList<St...
7
@SuppressWarnings("unchecked") public static <T> T createObject(Class<T> clazz) { Constructor<?> constructor; try { constructor = clazz.getConstructor(); return (T) constructor.newInstance(new Object[] {}); } catch (SecurityException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.p...
7
@Override public void mousePressed(MouseEvent e) { // only update their choice on their turn if (( (HumanPlayer) players.get(0)) .getHumanMustFinish()) { // find clicked cell int row = (e.getPoint().y - 2*board.cellYSize)/board.cellYSize; int col = e.getPoint().x/board.cellXSize; BoardCell cli...
5
@Test public void testAvg() throws Exception { double average = 199.0 / 2.0; // create a database connection PersistenceManager pm = new PersistenceManager(driver, database, login, password); // drop all tables pm.dropTable(Object.class); // create some test data for (int x = 0; x < 200; x++) { ...
2
public static void loop() { while (CSGame.state == States.ThreeDeeTest) { // Clear the screen of its filthy contents glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Push the screen inwards at the amount of speed glTranslatef(0, 0, speed); // Begin drawing...
8
public void moveSharks(){ for(int i = 0; i<sharks.size(); i++){ // make shark hunt enemies // if the shark is not in place if(sharks.get(i).getInPlace() == false){ // then get the shark in place sharks.get(i).initialSharkMove(); ...
5
public Player(int x, int y) { this.x = x; this.y = y; try { image = ImageIO.read(new File("res/player/playerSide.png")); } catch (IOException e) { e.printStackTrace(); } }
1
public Object pop() { if(top != null) { Object item = top.data; top = top.next; size--; return item; } return null; }
1
@Override public void run() { String serverAddress = SERVER_IP; try { Socket socket = new Socket(serverAddress, SERVER_PORT); BufferedReader in = new BufferedReader( new InputStreamReader(socket.getInputStream())); PrintWriter out = new PrintW...
3
public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line = ""; StringBuilder out = new StringBuilder(); for (int i = 1; i < dp.length; i++) dp[i] = (1.0 / (i + 1)) + dp[i - 1]; while ((line = in.readLine()) != null && ...
4
public void mouseReleased( MouseEvent e ) { Node mouseOverN = tgPanel.getMouseOverN(); if (mouseOverN!=null && dragAddNode!=null && mouseOverN!=dragAddNode) { Edge ed=tgPanel.findEdge(dragAddNode,mouseOverN); if (ed==null) tgPanel.addEdge(dragAddNode,mouseOverN, Edge.DEFAULT_LEN...
8
private Set<Point> n4(Point p) { Set<Point> n4 = new HashSet<Point>(); if (p.x > 0) { n4.add(new Point(p.x - 1, p.y)); } if (p.x < w - 1) { n4.add(new Point(p.x + 1, p.y)); } if (p.y > 0) { n4.add(new Point(p.x, p.y - 1)); } if (p.y < h - 1) { n4.add(new Point(p.x, p.y + 1)); } return n4...
4
@Override public void executeMsg(final Environmental myHost, final CMMsg msg) { super.executeMsg(myHost,msg); if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; if((msg.amISource(mob)) &&(gettingBonus) &&(msg.targetMinor()==CMMsg.TYP_WEAPONATTACK) &&(CMLib.dice().rollPercentage()>...
8
public static int calcMinEditDist(String original, String target) { int[][] minDistMap = new int[original.length() + 1][target.length() + 1]; for(int i = 0; i <= original.length(); i++) { minDistMap[i][0] = costDelete * i; } for(int j = 0; j <= target.length(); j++) { minDistMap[0][j] = costInsert *...
4
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); if (rotation % 2 == 1) { g.drawRect(50, 85, 100, 30); g.drawLine(0, 100, 50, 100); g.drawLine(150, 100, 200, 100); g.drawLine(50, 55, 80, 75); g.drawLine(80, 75,...
2
private static String recursiveStringManipulation(String s, char i, int index) { // recursive method cutoff, prevents an infinite loop if(index < s.length()) { modifiedStr = (s.charAt(index) == i) ? modifiedStr.append("*") : modifiedStr.append(s.charAt(index)); ...
2
private static void init() { //init command = new String(); stillPlaying = true; //items Items item0 = new Items(); item0.setItemName("Water"); item0.setDesc("--Will you take some water?"); Items item1 = new Items(); ...
0
public void Poison() { //if(Poisoned = false) { if(PoisonDelay <= 1) { poisondmg = true; newhptype = true; ...
3
public void zeichneSpieler(Graphics g){ //g.setColor(Color.WHITE); for(int x =0; x < level.tileIDs.length;x++){ /*level.karte.getWidth()*/ /*spieler.pos_y-10;x < spieler.pos_x +10*/ for(int y =0; y < level.tileIDs.length;y++){ System.out.println(level.getID(x,y)); } } }
2
public void control() { //Abrir canal de comunicación desde el teclado Video video = new Video(); String texto = ""; int x=0; InputStreamReader in = new InputStreamReader(System.in); BufferedReader buffer = new BufferedReader(in); System.out.println("...
5
protected void doUpdateItem(Item item, Object element) { // update icon and label // Similar code in TableTreeViewer.doUpdateItem() IBaseLabelProvider prov = getLabelProvider(); ITableLabelProvider tprov = null; if (prov instanceof ITableLabelProvider) { tprov = (ITableLabelProvider) prov; } int colu...
8
public static String formatHtml(String s) { return s.toString().replaceAll("\n", "<br>").replaceAll("\t", "&nbsp;&nbsp;&nbsp;&nbsp;"); }
0
private void _listDirFilesToCLient(File fp, Request req, Response resp) throws IOException { String path = req.getPath(); String key = fp.getPath() + fp.lastModified(); if((path.endsWith("/") || path.endsWith("\\") ) && !path.equals("/")) path = path.substring(0, path.length() - 1); String chtml = (String)ge...
8
private void horizontalCompactionLeft(Digraph<BrandesKoepfNode,Boolean> graph) { for (BrandesKoepfNode v : graph.vertices()) { v.sink = v; v.sink2 = v; v.shift = Integer.MAX_VALUE; v.x = Integer.MIN_VALUE; // undefined } for (BrandesKoepfNode v : graph.vertices()) { if (v.root == v) { placeBloc...
8
@Override public void actionPerformed(ActionEvent e) { JButton aceptar = vista.getLogin().getBtnAceptar(); JButton cancelar = vista.getLogin().getBtnCancelar(); JMenuItem mostrarAgregarUsuario = vista.getMenAgregarUsuario(); JButton agregar = vista.getAgregarUsuar...
9
@Override public void run() { InputStream inputStream = requestHandler.getInputStream(); RequestParser requestParser = new RequestParser(inputStream); HTTPStatusCodes httpStatusCodes = new HTTPStatusCodes(); Routes routes = new Routes(directory); Response response = new Response(httpStatusCodes, r...
1
public boolean isPannableUnbounded() { return grid != null && (grid.getNumRows() == -1 || grid.getNumCols() == -1); }
2
public void mouseDragged(MouseEvent e) { String str = "x: " + e.getX() + ",y: " + e.getY(); System.out.println(str); }
0
public static boolean search(int[] A, int target) { int first = 0; int last = A.length - 1; while (first != (last + 1)) { int mid = (first + last) / 2; if(A[mid] == target){ return true; }else if (A[first] < A[mid]) { if (A[fir...
8
public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } for (int i = 1; i <= 1000; i++) { if ((i % 3 == 0) && (i % 5 == 0)) { ...
9
public boolean setup2(XTreeCompiler compiler, XCodeGen code) { result = scope.get(ident, ident.name, access); switch(result.r){ case DUPLICATED: compiler.addDiagnostic(ident, "duplicated.var", ident.name, result.var.t.position.position.line); break; case FOUND: break; case DECLARED: if(result.var....
7
@Override public void act() { // Removes the dead handleds removeDeadHandleds(); // Checks collisions between all the listeners and collidables for (int listenerind = 0; listenerind < getHandledNumber(); listenerind++) { // Remembers the important data about the listener CollisionListener listener ...
9
public final void clock(long cycles) { if (nextCheck > cycles) return; autoForward(cycles); int delta = (int) (cycles - lastCycles); lastCycles = cycles; nextCheck = cycles + 13; via1T1Ctr = via1T1Ctr - delta; if (via1T1Ctr <= 0) { if ((via1AuxControl & 0x40) == 0x40) { // I...
9
public Boolean podeComerFanstasma(int n){ Query q2; switch(n){ case 0: q2 = new Query("comerBlinky"); return q2.hasSolution(); case 1: q2 = new Query("comerClyde"); return q2.hasSolution(); case 2: ...
4