id
stringlengths
36
36
text
stringlengths
1
1.25M
f113c868-3350-4afd-ac8c-a4a8bc9f6493
public String getDescriptor() { switch (type) { case 0: return "Crystal"; case 1: return "Dirt"; case 2: return "Grass"; case 3: return "Rock"; default: return "Sand"; } }
a69b3713-6f18-4234-9dc6-544efa5ac008
public void addActivity(Activity activity) { activityList.add(activity); }
358cdce3-f7fb-4d27-aa16-a8e25ddd6b6e
public ActivityList getActivityList() { return activityList; }
8710e32e-2e18-450b-a5fd-53ad67e3f379
public int toInt() { return 0; }
f14d40fe-9b7c-4a41-8b67-c2912112d981
public void setVisibleBy(int player) { visibleBy[player - 1] = player; }
2545d343-7ff9-4ba6-96b8-43994607ac63
public boolean isVisibleBy(int player) { return visibleBy[player - 1] == player; }
51ecf4ae-dc65-46aa-bcaf-c3b3128ef99f
public int getIdValu() { return idValu; }
c3fae63b-e011-4fa6-a1d5-425f765d0f7d
public int getIntAtk() { return intAtk; }
d65b2e1e-9af3-4138-8e7a-2225b5014657
public int getIntDef() { return intDef; }
69304041-bdc8-4e0c-a051-9fc716263938
public int getSolInv() { return solInv; }
618790ef-4931-4f0e-97f3-3beaf35ca2f5
public int getSolAff() { return solAff; }
c83f38af-4d79-43a4-9b21-886c6a42bd81
public int getSymbio() { return symbio; }
c148ed73-6f0c-477a-95bd-86a9c1fd952a
public int getHordAp() { return hordAp; }
dc3400c5-3d38-43e3-979f-41cd3afd6ed0
public int getPoison() { return poison; }
a8c03469-b0c1-4f61-8800-e551797f6450
public int getHltReg() { return hltReg; }
8603fb11-01ed-4a9b-ad45-08c14c369a32
public int getKenisi() { return kenisi; }
3f9e9a06-e1cc-443b-9ac1-2a7672313bd8
public int getCalmAu() { return calmAu; }
3deb2c93-f938-4c83-a7b2-0ca5cf133e23
public int getIllusi() { return illusi; }
28c13ca4-896a-4fb6-80a8-0a9d6905e14d
public int getDisIll() { return disIll; }
e2a29296-5905-419d-aa4c-26cefac67e0e
public int getHlyAtk() { return hlyAtk; }
37d79911-0276-4c76-a84f-281881272394
public int getHlyDef() { return hlyDef; }
37e44f06-f38b-435a-9615-22d29b93ac03
public int getDrkAtk() { return drkAtk; }
ff4a9e60-59a0-4629-bf4b-6054aa3d4edc
public int getDrkDef() { return drkDef; }
721fae37-f48a-4338-8c46-1d4fce0ac58c
public int getDispel() { return dispel; }
e143c9d9-7cea-491b-bd9c-75c36f3d5b97
public int getSplStr() { return splStr; }
f41bf63e-dee5-47eb-84cc-8da5c6767e43
public int getSumStr() { return sumStr; }
6d90cfc3-f3db-4576-8c22-eb83b1ffcdee
public int getPlnAff() { return plnAff; }
c95bda29-7f3c-46f2-b10c-722c1b52fefe
public int getThreat() { return threat; }
7871510d-bdd1-4026-bdf7-27bc618815b9
public int getBravry() { return bravry; }
c88ffd5a-6ab1-4bce-b922-e148af62aec1
public int getEthAtk() { return ethAtk; }
13fb1064-2b28-48aa-bb96-99c4041c399b
public int getEthDef() { return ethDef; }
b351a59e-12a5-4e0e-afc8-197479d3de2f
public int getWndAtk() { return wndAtk; }
e8a2f130-2470-41ed-86fe-e8ae8a210c55
public int getWndDef() { return wndDef; }
e688956b-48fe-43a6-8d2e-cc3a60748709
public int getFirAtk() { return firAtk; }
586e4e71-00ed-4c4f-a906-cfaa05bf2e2c
public int getFirDef() { return firDef; }
e9564a1d-8651-44f2-8728-06cf84233f19
public int getWtrAtk() { return wtrAtk; }
065e2a62-2739-4389-b1ec-e964b079cec5
public int getWtrDef() { return wtrDef; }
bea42f2d-73ba-4e01-b6a3-c8a3b37f3e4c
public int getDthBlw() { return dthBlw; }
698f9de2-6515-4e13-8978-0cc587aa029d
public int getNullif() { return nullif; }
89949208-b9b5-46a0-8803-32dea493e2f5
public int getUnarmd() { return unarmd; }
e7fcf0b7-ef8b-424e-adb3-b0df156f680e
public int getStrnth() { return strnth; }
c8852e79-2e35-4536-94a7-66a0ab57e1e6
public int getAglAtk() { return aglAtk; }
86ae35f2-81c2-41ef-987f-383b28547a18
public int getAglDef() { return aglDef; }
deaa9bfb-1493-4f08-8898-1040cb9c7306
public int getCharge() { return charge; }
5365d4e7-5a7e-4a5c-8ea6-bc0ec92ebc2a
public int getStabil() { return stabil; }
47f88325-15fe-4be5-870d-3ce63bea0ea5
public int getBlunts() { return blunts; }
61c38097-b749-4fa1-a180-8220240929a5
public int getPaddin() { return paddin; }
4a502915-ea90-4810-9d7e-f5e5ce55de57
public int getBlades() { return blades; }
140bb625-7fc8-48a8-b79a-f976f964c80f
public int getShells() { return shells; }
c2ee26b7-7c3e-49c7-847d-a3bbadb9c9a3
public int getPierce() { return pierce; }
36b3aab2-ac5e-403a-a4e0-6992a5258ad4
public int getRnfrcm() { return rnfrcm; }
a04c2e3e-3864-47f2-afa4-eaa5a034689a
public int getDmgMel() { return dmgMel; }
535ae83c-6ec9-451b-8bdf-b5883f44a5e9
public int getDmgRng() { return dmgRng; }
86bd8c48-9245-474e-ab94-fd8c43b98aec
public int getDmgOne() { return dmgOne; }
53ddf00b-2014-493b-a477-25069bb7b764
public int getDmgTwo() { return dmgTwo; }
639f9a30-81ce-4215-b51f-4b835ec61083
public int getDmgThr() { return dmgThr; }
2589eb5e-452a-469f-8138-4c1890f9b302
public int getDmgFor() { return dmgFor; }
04691a14-5437-4fd1-ad3b-f22f43c35a29
public int getHealth() { return health; }
e74c7e1c-b8dd-4fea-bc9c-25d607a939e4
public int getMagPnt() { return magPnt; }
14284007-8404-4bd7-88ac-454b5741ace7
public int getMagRgn() { return magRgn; }
71ec7d3f-5ca3-4188-a44e-f2bacd1a02c6
public int getEngPnt() { return engPnt; }
3061d524-a895-492a-a742-5925857c9ed7
public int getEngRgn() { return engRgn; }
7625ba52-e521-462f-84d5-be667d5c48a9
public int getAtkSpd() { return atkSpd; }
5d9b3e10-9fd4-4997-b35c-82905dd4308a
public int getNumAtk() { return numAtk; }
1cbddfb5-16b7-437c-9a7b-7dbc6a2b61ba
public int getSihtRd() { return sihtRd; }
dad350ce-c2f7-4e77-b64e-091ef4ae97f2
public int getMovSpd() { return movSpd; }
06182164-5b92-4010-a446-a66c775e71bd
public int getPrdCst() { return prdCst; }
7e168736-6d27-4854-a1f6-bdd1b811663d
public int getRanged() { return ranged; }
28c67cce-db9e-4f1c-a3ad-5abb337cdc87
public int getSqrOcu() { return sqrOcu; }
597bc4ab-ef1d-41fb-bcb0-8605897be91c
public int getLevels() { return levels; }
0a62574f-1b6c-409c-8d64-580120a1372b
public int getDthEXP() { return dthEXP; }
18eb857c-61c3-4854-b39c-8ec7e45a7ea3
public int getPlayer() { return player; }
815db467-6ef5-445f-96d5-9180003e885c
public int getCurLoc() { return curLoc; }
d315ca21-f74b-4a38-bb04-c83af349c6f3
public int getChnTim() { return chnTim; }
f62c02e6-9e23-4fe3-81d8-20bc8ed2b940
public int getTrnPld() { return trnPld; }
d9c4f274-625b-4e4b-b7a9-c70d2db5e0d5
public boolean isVisible() { return visible; }
e3d1918a-a18a-4e3c-b045-e1a9044929b0
public boolean isActive() { return active; }
0ef60945-2fe3-4448-813b-fa674baf7b9a
public boolean isDisabled() { return disabled; }
1a5ea8ef-74b2-4303-b0de-60c075002801
public void setVisible(boolean b) { visible = b; }
dcc03f52-7923-492b-a9a1-8ec30f74f586
public void setActive(boolean b) { active = b; }
e106007d-e23b-4711-a2a7-456d8cfc4ed6
public void setDisabled(boolean b) { disabled = b; }
3f72036c-c4d3-421b-b104-75cc6a08012f
public String getDescriptor() { // TODO Auto-generated method stub return null; }
afce516b-fa7a-43bd-8147-fc54954b4158
public PhysicalBuilder(int player, int location) { intAtk = 3; intDef = 6; solInv = -1; solAff = 3; symbio = -1; hordAp = 3; poison = -1; hltReg = 3; kenisi = -1; calmAu = 3; illusi = -1; disIll = 4; hlyAtk = -1; hlyDef = 5; drkAtk = -1; drkDef = 4; dispel = -1; splStr = 4; sumStr = -1; plnAff = 3; threat = -1; bravry = 3; ethAtk = -1; ethDef = 3; wndAtk = -1; wndDef = 3; firAtk = -1; firDef = 4; wtrAtk = -1; wtrDef = 5; dthBlw = -1; nullif = 4; unarmd = -1; strnth = 3; aglAtk = -1; aglDef = 3; charge = -1; stabil = 3; blunts = -1; paddin = 3; blades = -1; shells = 4; pierce = 6; rnfrcm = 5; dmgMel = 3; dmgRng = -1; dmgOne = 0; dmgTwo = 0; dmgThr = 0; dmgFor = 0; health = 12; magPnt = 6; magRgn = 3; engPnt = -1; engRgn = -1; atkSpd = 0; numAtk = 4; sihtRd = 6; movSpd = 6; prdCst = 4; ranged = -1; sqrOcu = 1; levels = 0; dthEXP = 6; this.player = player; curLoc = location; chnTim = 0; trnPld = 0; idValu = 0; }
b5ceb594-ec6b-4263-b937-f9abda327631
public int toInt() { if (visible) { return 0; } else { return - 1; } }
c696389d-c177-4a3f-b923-0692583045b3
public ActivityList process() { ActivityList result = new ActivityList(); for (int i = 0; i < size(); i++) { get(i).organize(); for (int j = 0; j < get(i).size(); j++) { result.add(get(i).get(j)); } } result.organize(); return result; }
f298ebf4-26b9-4171-8bed-57e452ac7e31
public PrimaryController() { super(); setDefaultCloseOperation(EXIT_ON_CLOSE); addMouseListener(this); addKeyListener(this); setEnabled(false); contentPane = getContentPane(); }
5e06b8a2-6eb6-47bd-895a-35ca5a0d3745
public void loadInitialGameState() { gameModel = new PrimaryModel(); gridSize = 500; gameModel.loadInitialModelState(gridSize, 4); gameView = new PrimaryView(); gameView.loadInitialViewState(getGraphicsConfiguration(), gridSize); boundX = getGraphicsConfiguration().getBounds().width; boundY = getGraphicsConfiguration().getBounds().height; contentPane.add(gameView); }
3ce40b94-558c-4be6-b3f4-0bdcdcf8ae82
public void startGame() { gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment(); primaryGDev = gEnv.getDefaultScreenDevice(); isFSSupported = primaryGDev.isFullScreenSupported(); setUndecorated(isFSSupported); setResizable(!isFSSupported); if (isFSSupported) { // Full-screen mode setIgnoreRepaint(isFSSupported); setUndecorated(isFSSupported); primaryGDev.setFullScreenWindow(this); validate(); int refreshHertz = primaryGDev.getDisplayMode().getRefreshRate(); if(refreshHertz == DisplayMode.REFRESH_RATE_UNKNOWN) { refreshHertz = 30; } viewUpdateController = new Timer(1000/refreshHertz, new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { gameView.updateClock(gameModel.getClockFace()); render(graphicsPlaceHolder); int x = MouseInfo.getPointerInfo().getLocation().x, y = MouseInfo .getPointerInfo().getLocation().y; if (!actionDisabled) { if (x < 5 && y < 5) { gameView.scrollNorthWest(); } if (x < 5 && y > 5 && y < boundY - 5) { gameView.scrollWest(); } if (x < 5 && y > boundY - 5) { gameView.scrollSouthWest(); } if (x > 5 && x < boundX - 5 && y > boundY - 5) { gameView.scrollSouth(); } if (x > boundX - 5 && y > boundY - 5) { gameView.scrollSouthEast(); } if (x > boundX - 5 && y > 5 && y < boundY - 5) { gameView.scrollEast(); } if (x > boundX - 5 && y < 5) { gameView.scrollNorthEast(); } if (x > 5 && x < boundX - 5 && y < 5) { gameView.scrollNorth(); } } } }); createBufferStrategy(2); bufferStrategy = getBufferStrategy(); viewUpdateController.start(); } else { // Windowed mode pack(); setVisible(true); } setEnabled(true); }
7b8f64a6-f307-4d63-a609-18c2f4cba2c4
@Override public void actionPerformed(ActionEvent arg0) { gameView.updateClock(gameModel.getClockFace()); render(graphicsPlaceHolder); int x = MouseInfo.getPointerInfo().getLocation().x, y = MouseInfo .getPointerInfo().getLocation().y; if (!actionDisabled) { if (x < 5 && y < 5) { gameView.scrollNorthWest(); } if (x < 5 && y > 5 && y < boundY - 5) { gameView.scrollWest(); } if (x < 5 && y > boundY - 5) { gameView.scrollSouthWest(); } if (x > 5 && x < boundX - 5 && y > boundY - 5) { gameView.scrollSouth(); } if (x > boundX - 5 && y > boundY - 5) { gameView.scrollSouthEast(); } if (x > boundX - 5 && y > 5 && y < boundY - 5) { gameView.scrollEast(); } if (x > boundX - 5 && y < 5) { gameView.scrollNorthEast(); } if (x > 5 && x < boundX - 5 && y < 5) { gameView.scrollNorth(); } } }
1e8a5893-7b3c-4931-bfc3-688aa51fc5ba
protected void render(Graphics g) { try { g = bufferStrategy.getDrawGraphics(); gameView.render(g, gameModel.getVisualModel()); } finally { // Prudent to free system resources when finished. g.dispose(); } bufferStrategy.show(); }
b18fffd9-61d7-4495-bcc3-7bc5828b3330
@Override public void keyPressed(KeyEvent arg0) { // TODO Auto-generated method stub }
dfcd4d69-fdd1-4e97-9977-33742a6379dd
@Override public void keyReleased(KeyEvent arg0) { if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE) { System.exit(0); } }
13856361-0706-458e-adb0-c1719609aa10
@Override public void keyTyped(KeyEvent arg0) { // TODO Auto-generated method stub }
aa9e1a7b-291d-4330-8866-14934a2da893
@Override public void mouseClicked(MouseEvent arg0) { int x = arg0.getLocationOnScreen().x, y = arg0.getLocationOnScreen().y; // Clicked inside the map grid. if (y <= boundY - gameView.getIPaneHeight() - gameView.getYOffset() && y > gameView.getYOffset() && x <= boundX - gameView.getXOffset() && x > gameView.getXOffset()) { // Identify the target of the click. int c = gameView.getVisX(), r = gameView.getVisY(), row = (r + y - gameView.getYOffset()) / gameView.getUnitLength(), column = (c + x - gameView.getXOffset()) / gameView.getUnitLength(), idTag = gameModel.getVisualModel()[row][column]; if (!unitIsSelected && !terrainIsSelected) { if (idTag == -1) { terrainIsSelected = true; gameView.setTerrainFocusTarget(row, column + gridSize, gameModel.getDescriptor(row, column + gridSize)); } else { unitIsSelected = true; gameView.setFocusTarget(row, column, InformationIndex.getMovementRadius(idTag), InformationIndex.getName(idTag)); } } else { } } else if (y > boundY - gameView.getIPaneHeight() - gameView.getYOffset() && x <= boundX - gameView.getXOffset() && x > gameView.getXOffset()) { // The Information Panel if (x >= gameView.getEndTurnX() && x < gameView.getEndTurnX() + gameView.getEndTurnWidth() && y >= gameView.getEndTurnY() && y < gameView.getEndTurnY() + gameView.getEndTurnHeight()) { System.out.println("You pressed the end turn button."); } } }
f656b3c1-7ffd-415d-98d0-6fc1c812c6c4
@Override public void mouseEntered(MouseEvent arg0) { // Do Nothing. This makes no sense in a full-screen window. // You cannot exit or enter. }
65605170-e826-4deb-b6e9-2f9f2d19262e
@Override public void mouseExited(MouseEvent arg0) { // Do Nothing. This makes no sense in a full-screen window. // You cannot exit or enter. }
ef786b9b-ab5e-4028-9fd3-39e4e5930a4e
@Override public void mousePressed(MouseEvent arg0) { // Probably going to be used...not yet though. }
7d489455-4125-4609-96f7-c731335d81f4
@Override public void mouseReleased(MouseEvent arg0) { // Probably going to be used...not yet though. }
85adea55-b816-45a9-b3e6-eef78742b528
public static void generateNotification(String notification, int type) { switch (type) { case 0: actionDisabled = true; break; } }
ab007a61-1ddc-4b92-8ee1-8a1778fdfaf3
@Override public void mouseDragged(MouseEvent arg0) { // TODO Auto-generated method stub }