Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 5,300 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 625 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,044 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 538 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 440 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 354 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 2,884 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,977 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 2,198 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 664 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 698 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 12,778 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 636 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,064 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 548 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 364 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 439 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,642 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,089 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,120 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 880 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 965 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 735 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,041 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,454 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 299 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 612 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 1,652 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 382 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 714 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 305 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,800 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 999 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,468 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... | 509 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,519 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1,989 |
github-java-corpus | 2,012 | /**
*
*/
package com.gisgraphy.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gisgraphy.domain.valueobject.GisgraphyServiceType;
import com.gisgraphy.serializer.common.IoutputFormat... | 161 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 799 |
github-java-corpus | 2,012 | /**
*
*/
package com.gisgraphy.servlet;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.gisgraphy.addressparser.AddressQuery;
import com.gisgraphy.addressparser.web.AbstractAddressServlet;
import com.gisgraphy.domain.valueobject.GisgraphyServiceType;
import com.gisgraphy.seri... | 197 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 346 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 731 |
github-java-corpus | 2,012 | /**
*
*/
package com.gisgraphy.rest;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.gisgraphy.serializer.UniversalSerializer;
import com.gisgraphy.seri... | 133 |
github-java-corpus | 2,012 | /*******************************************************************************
* Gisgraphy Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 736 |
github-java-corpus | 2,012 | package client;
import java.io.*;
import java.net.*;
import java.util.concurrent.*;
import java.util.*;
import gamelogic.*;
import catanui.*;
/**
* Represents a client that connects to the server and maintains that connection
* by reading and writing to the socket
*/
public class Client extends Thread {
private ... | 2,354 |
github-java-corpus | 2,012 | package client;
import java.util.*;
/**
* Stores a request to send to the java server, as well
* as the response from the server
*/
public class Request {
private Object _command;
private boolean _completed;
private ArrayList<String> _result;
/** Initialize a command with the string that should be written ... | 237 |
github-java-corpus | 2,012 | package gamelogic;
/**
Represents a pair of x and y coordinates
*/
public class CoordPair implements java.io.Serializable{
public int _x, _y;
public CoordPair(int x, int y) {
_x = x;
_y = y;
}
public boolean equals(Object o) {
CoordPair v = (CoordPair) o;
return (v.getX() == _x &... | 171 |
github-java-corpus | 2,012 | package gamelogic;
/**
Represents a generic pair of objects
*/
public class Pair implements java.io.Serializable {
Object _a;
Object _b;
public Pair(Object a, Object b) {
_a = a;
_b = b;
}
public Object getA() { return _a;}
public Object getB() { return _b; }
public ... | 196 |
github-java-corpus | 2,012 | package gamelogic;
/**
Represents a hex edge on the game board
*/
public class Edge {
Vertex _start;
Vertex _end;
boolean _hasRoad = false;
public Edge(Vertex s, Vertex e) {
_start = s;
_end = e;
}
public boolean equals(Object o) {
Edge e = (Edge) o;
return (e.getStartV().equals(_start) && e.getEndV... | 172 |
github-java-corpus | 2,012 | package gamelogic;
import catanui.*;
/**
Represents a proposed trade
*/
public class Trade implements java.io.Serializable {
private BoardObject.type[] _ins;
private BoardObject.type[] _outs;
private String _backupouts;
private String _backupins;
private int _tradeID;
private int _opcode;
public Trade(BoardO... | 878 |
github-java-corpus | 2,012 | package gamelogic;
import java.util.*;
import java.lang.*;
import catanui.*;
/**
Represents a Hex vertex on the game board.
*/
public class Vertex {
private int _object = 0;
private int _owner = -1;
int _x, _y;
BoardObject.type _port = null;
public Vertex(int x, int y) {
_x = x;
_y = y;
}
public boole... | 349 |
github-java-corpus | 2,012 | package gamelogic;
import java.util.*;
import java.lang.*;
/**
Represents a hex on the game board
*/
public class Hex {
private int _rollNum;
private int _hexNum;
private catanui.BoardObject.type _resource;
private double _x, _y;
ArrayList<Vertex> _vertices;
public Hex(int hexNum, double x, double y) {
_he... | 317 |
github-java-corpus | 2,012 | package gamelogic;
import java.lang.Integer;
import java.util.*;
import catanui.*;
/**
Represents one of the game's players
*/
public class Player {
private ArrayList<catanui.BoardObject.type> _hand;
private ArrayList<Edge> _roads;
private ArrayList<Vertex> _settlements;
private ArrayList<Vertex> _cities;... | 723 |
github-java-corpus | 2,012 | package gamelogic;
import java.util.*;
import java.util.Map.Entry;
import catanai.*;
import catanui.*;
public class PublicGameBoard {
private final int POINTS_TO_WIN = 10;
private ArrayList<Vertex> _vertices;
private ArrayList<Hex> _hexes;
private ArrayList<Edge> _edges;
private ArrayList<Player> _players;
p... | 7,082 |
github-java-corpus | 2,012 | package gamelogic;
import java.util.*;
import java.lang.*;
import catanui.*;
public class ClientGameBoard {
private int _points_to_win;
private ArrayList<Hex> _hexes;
private ArrayList<Player> _players;
private int _longestRd = 4;
private int _longestRd_Owner = -1;
client.Client _client;
public int _playerNu... | 4,043 |
github-java-corpus | 2,012 | package catanui;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import java.awt.Color;
import java.awt.image.BufferedImage;
import gamelogic.*;
public class MapPanel extends JPanel implements MouseListener, MouseMo... | 4,169 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.Graphics;
import java.awt.Image;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author jfedor
*/
public interface BoardObject {
... | 400 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.Color;
import java.awt.Graphics;
/**
*
* @author jfedor
*/
public class Settlement implements BoardObject {
private int _x;
private int _y;
private int _w = 50;
priv... | 409 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.Color;
import java.awt.Graphics;
/**
*
* @author jfedor
*/
public class City implements BoardObject {
private int _x;
private int _y;
private int _w = 50;
private in... | 400 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import gamelogic.*;
/**
*
* @author jfedor
*/
public class SideBar extends JPanel implements MouseListener, Mous... | 6,320 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.*;
import javax.swing.*;
/**
*
* @author jfedor
*/
public class Card implements BoardObject {
... | 404 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* The Splash screen is the menu that will launch you into either the server or client
*/
package catanui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.n... | 4,466 |
github-java-corpus | 2,012 | package catanui;
import java.awt.event.*;
import javax.swing.*;
public class MyKeyListener implements KeyListener{
private String _dest;
public MyKeyListener(String t) {
_dest = t;
}
public void keyReleased(KeyEvent k) {
_dest = ((JTextField) k.getSource()).getText();
System.out.println(_dest);
}
public vo... | 88 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.*;
/**
*
* @author jfedor
*/
public class Hex {
private double _x;
private double _y;
private int _radius;
private BoardObject.type _type;
private int _numb... | 789 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
/**
*
* @author jfedor
*/
public class Road implements BoardObject {
private int _x;
... | 674 |
github-java-corpus | 2,012 | package catanui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Board extends JFrame {
/*
public static void main(String[] args) {
Board m = new Board(new ClientGameBoard());
}*/
public int shrinkByY = 54 + 10;
public int shrinkByX = 176;
public ... | 1,132 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package catanui;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import gamelogic.*;
/**
*
* @author jfedor
*/
public class ChatBar extends JPanel implements MouseListener, Mous... | 1,283 |
github-java-corpus | 2,012 | package server;
import java.io.*;
import java.net.*;
import java.util.*;
import catanui.*;
import gamelogic.*;
/**
* Encapsulate IO for the given client {@link Socket}, with a group of
* other clients in the given {@link ClientPool}.
*/
public class ClientHandler extends Thread {
private ClientPool _pool;
private... | 2,085 |
github-java-corpus | 2,012 | package server;
import java.io.IOException;
import java.util.*;
import gamelogic.Trade;
/**
* A group of {@link ClientHandler}s representing a "chat room".
*/
public class ClientPool {
private static final int ID_BOUND = 4194304;
private ArrayList<ClientHandler> _clients;
private gamelogic.PublicGameBoard _board;... | 1,483 |
github-java-corpus | 2,012 | package server;
import java.io.*;
import java.net.*;
import java.util.*;
import catanui.*;
/**
* A chat server, listening for incoming connections and passing them
* off to {@link ClientHandler}s.
*/
public class Server extends Thread {
private final int SECONDS_PER_TURN = 5;
private int _port;
private ServerSo... | 1,364 |
github-java-corpus | 2,012 | package catanai;
import java.util.List;
import java.util.Map;
import gamelogic.PublicGameBoard;
public class BuildSettlement extends Move implements AIConstants {
private Vertex _target;
public BuildSettlement(Player pl, Vertex target) {
if (target == null) throw new NullPointerException("Ye cannot ... | 718 |
github-java-corpus | 2,012 | package catanai;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.List;
public class AIPlayer extends Player implements AIConstants {
... | 6,216 |
github-java-corpus | 2,012 | package catanai;
public enum SpendType {
Settlement, City, Road, DevCard;
}
| 21 |
github-java-corpus | 2,012 | package catanai;
public class BoardCoordinate implements AIConstants {
public static final BoardCoordinate ORIGIN = new BoardCoordinate(0, 0, 0);
private int _x, _y, _z;
public BoardCoordinate(int x, int y, int z) {
_x = x;
_y = y;
_z = z;
}
public int x() {
return _x;
}
public int... | 1,119 |
github-java-corpus | 2,012 | package catanai;
import java.util.HashSet;
import java.util.Set;
public class Edge implements AIConstants {
private Set<Vertex> _ends;
private boolean _road;
private Player _controller;
public Edge(Set<Vertex> ends) {
_ends = ends;
_road = false;
_controller = null;
}
public void addEn... | 368 |
github-java-corpus | 2,012 | package catanai;
import java.util.List;
import server.Server;
import gamelogic.PublicGameBoard;
import gamelogic.Trade;
import catanui.BoardObject;
public class ProposeTrade extends Move implements AIConstants {
private int _id;
private List<Resource> _to, _from;
private gamelogic.Trade _tb;
private Server _s;
... | 702 |
github-java-corpus | 2,012 | package catanai;
import java.util.List;
import java.util.Map;
import gamelogic.PublicGameBoard;
public class BuildCity extends Move implements AIConstants {
private Vertex _target;
public BuildCity(Player pl, Vertex target) {
_mover = pl;
_target = target;
}
@Override
public boolean plac... | 668 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class PlayKnight extends Move {
private Tile _t;
public PlayKnight(Player p, Tile target) {
_mover = p;
_isPlaced = false;
_t = target;
}
@Override
public boolean place(GameBoard board) {
_mover.addKnight();
board.moveRobber(_t)... | 164 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class Swap extends Move {
Resource _f, _t;
int _r;
public Swap(Player p, Resource from, Resource to, int ratio) {
_mover = p;
_isPlaced = false;
_f = from;
_t = to;
_r = ratio;
}
@Override
public boolean place(GameBoard boa... | 190 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class NoMove extends Move {
public NoMove() {
_mover = null;
}
@Override
public boolean place(GameBoard board) {
return true;
}
@Override
public boolean make(PublicGameBoard board) {
return false;
}
@Override
public vo... | 110 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class BuyDevCard extends Move {
public BuyDevCard(Player mover) {
_mover = mover;
_isPlaced = false;
}
@Override
public boolean place(GameBoard board) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean m... | 152 |
github-java-corpus | 2,012 | package catanai;
public enum TileType {
Ore, Brick, Timber, Sheep, Wheat, Desert;
}
| 24 |
github-java-corpus | 2,012 | package catanai;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import catanui.BoardObject;
public interface AIConstants {
// Structure of board comp... | 3,770 |
github-java-corpus | 2,012 | package catanai;
import java.util.HashSet;
import java.util.Set;
public class Vertex implements AIConstants {
private Set<Edge> _edges;
private Set<Tile> _tiles;
private BuildType _build;
private Player _controller;
private Resource _port;
private BoardCoordinate _location;
public Vertex(Set<Edg... | 956 |
github-java-corpus | 2,012 | package catanai;
public enum Heuristic {
AttackLeader, AttackNeighbor, Develop, Expand, Urbanize, Spend, Hoard;
}
| 30 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class PlayMonopoly extends Move {
private Resource _r;
public PlayMonopoly(Player p, Resource res) {
_mover = p;
_isPlaced = false;
_r = res;
}
@Override
public boolean place(GameBoard board) {
int amt = 0;
for (Opponent opp : _... | 202 |
github-java-corpus | 2,012 | package catanai;
import java.util.Set;
public class Tile implements AIConstants {
private int _rollNum;
private TileType _resource;
private boolean _robber;
private Set<Vertex> _vertices;
public Tile(Set<Vertex> vertices) {
_rollNum = -1;
_resource = null;
_robber = false;
_vertices = ver... | 265 |
github-java-corpus | 2,012 | package catanai;
import java.util.List;
import java.util.Map;
public class BuildRoad extends Move implements AIConstants {
private Edge _target;
public BuildRoad(Player mover, Edge target) {
_mover = mover;
_target = target;
_isPlaced = true;
}
@Override
public boolean place(GameBoard bo... | 966 |
github-java-corpus | 2,012 | package catanai;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Opponent extends Player implements AIConstants {
public Opponent(gamelogic.PublicGameBoard pub, GameBoard board, String id) {
_publicBoard = pub;
_b... | 884 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class PlayRoadBldg extends Move {
private Edge _e0, _e1;
public PlayRoadBldg(Player p, Edge e0, Edge e1) {
_mover = p;
_isPlaced = false;
_e0 = e0;
_e1 = e1;
}
@Override
public boolean place(GameBoard board) {
// TODO Auto-gener... | 258 |
github-java-corpus | 2,012 | package catanai;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.List;
public abstract class Player implements AIConstants {
protected List<Resource> _hand;
protected Set<Vertex> _cities;
protected Set<Vertex> _settlements;
protected ... | 2,022 |
github-java-corpus | 2,012 | package catanai;
public enum Resource {
Ore, Brick, Timber, Sheep, Wheat, Unknown;
}
| 23 |
github-java-corpus | 2,012 | package catanai;
import java.util.List;
import catanui.BoardObject;
import gamelogic.PublicGameBoard;
import gamelogic.Trade;
public class FulfillTrade extends Move implements AIConstants {
private Player _rec;
private int _id;
private List<Resource> _to, _from;
private Trade _tb;
public FulfillTrade(Player pr... | 551 |
github-java-corpus | 2,012 | package catanai;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
public class GameBoard implements AIConstants {
private Map<BoardCoordinate, Vertex> _v;... | 3,838 |
github-java-corpus | 2,012 | package catanai;
public enum BuildType {
None, Settlement, City;
}
| 17 |
github-java-corpus | 2,012 | package catanai;
import gamelogic.PublicGameBoard;
public class PlayYrOfPlenty extends Move implements AIConstants {
private Resource _r;
public PlayYrOfPlenty(Player p, Resource res) {
_mover = p;
_isPlaced = false;
_r = res;
}
@Override
public boolean place(GameBoard board) {
for (int i... | 191 |
github-java-corpus | 2,012 | package catanai;
public enum DevCard {
Knight, Monopoly, YearOfPlenty, Palace, University, Market, RoadBuilding;
}
| 31 |
github-java-corpus | 2,012 | package catanai;
public abstract class Move {
protected Player _mover;
protected boolean _isPlaced;
public abstract boolean place(GameBoard board);
public abstract boolean make(gamelogic.PublicGameBoard board);
public abstract void broadcast(AIPlayer p, gamelogic.PublicGameBoard board);
public abstrac... | 100 |
github-java-corpus | 2,012 | package org.coffeecats.coffeetime.gameobjects.fooditemdefs;
import org.coffeecats.coffeetime.gameobjects.GameFoodItem;
import org.coffeecats.coffeetime.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Log;
/** Describes the Pie Slice food ... | 487 |
github-java-corpus | 2,012 | package org.coffeecats.coffeetime.gameobjects.fooditemdefs;
import org.coffeecats.coffeetime.gameobjects.GameFoodItem;
import org.coffeecats.coffeetime.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Log;
/** Describes the Coffee food ite... | 482 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.