This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.ai.path; | |
| import com.artemis.Entity; | |
| import com.badlogic.gdx.ai.pfa.Connection; | |
| import com.badlogic.gdx.math.Vector2; | |
| import com.badlogic.gdx.utils.Array; | |
| import com.carterza.generation.ship.grid.GridMap; | |
| import java.util.List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.system.turn; | |
| import com.artemis.Aspect; | |
| import com.artemis.BaseEntitySystem; | |
| import com.artemis.ComponentMapper; | |
| import com.artemis.Entity; | |
| import com.artemis.annotations.Wire; | |
| import com.badlogic.gdx.Gdx; | |
| import com.carterza.component.TurnComponent; | |
| import com.carterza.entity.FutureEntityTurn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.system.ai; | |
| import com.artemis.Aspect; | |
| import com.artemis.ComponentMapper; | |
| import com.artemis.Entity; | |
| import com.artemis.systems.IteratingSystem; | |
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.ai.GdxAI; | |
| import com.badlogic.gdx.math.Vector2; | |
| import com.carterza.action.BaseAction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.world; | |
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.graphics.OrthographicCamera; | |
| import com.badlogic.gdx.graphics.g2d.Animation; | |
| import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
| import com.badlogic.gdx.graphics.g2d.TextureAtlas; | |
| import com.badlogic.gdx.graphics.g2d.TextureRegion; | |
| import com.badlogic.gdx.maps.tiled.TiledMap; | |
| import com.badlogic.gdx.math.Vector2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.generator.spacecraft; | |
| import com.badlogic.gdx.graphics.Color; | |
| import com.badlogic.gdx.graphics.Pixmap; | |
| import com.carterza.generator.graph.ComparablePoint2i; | |
| import com.carterza.generator.graph.Graph; | |
| import com.carterza.generator.graph.Node; | |
| import com.carterza.generator.pathfind.HallwayMover2d; | |
| import com.carterza.generator.pathfind.HallwayPathFinder; | |
| import com.stewsters.util.mapgen.twoDimension.MapGen2d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void bfs(Node rootNode){ | |
| initializeNodes(); | |
| Queue q = new LinkedList(); | |
| q.add(rootNode); | |
| rootNode.visited=true; | |
| int parentDistance = 0; | |
| int parentLevel = 0; | |
| rootNode.setLevel(parentLevel); | |
| rootNode.setDistance(parentDistance); | |
| List<Node> nodeList = new ArrayList<Node>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TreeMap<Integer, List<Node>> nodesSortedByLevel = sc.roomGraph.getNodesSortedByLevel(); | |
| Iterator<Map.Entry<Integer, List<Node>>> nodesSortedByLevelIterator = nodesSortedByLevel.entrySet().iterator(); | |
| while(nodesSortedByLevelIterator.hasNext()) { | |
| Map.Entry<Integer, List<Node>> e = nodesSortedByLevelIterator.next(); | |
| for(Node n : e.getValue()) { | |
| if(n.getParent() == null && e.getKey() != 0) { | |
| for(Edge edge : n.getNeighbors()) { | |
| if(nodesSortedByLevel.get(e.getKey()-1).contains(edge.getNeighbor(n))) | |
| n.setParent(edge.getNeighbor(n)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Star Nest by Pablo Román Andrioli | |
| // This content is under the MIT License. | |
| #define iterations 17 | |
| #define formuparam 0.53 | |
| #define volsteps 20 | |
| #define stepsize 0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.carterza.world; | |
| import com.badlogic.gdx.graphics.Color; | |
| import com.badlogic.gdx.graphics.g2d.Animation; | |
| import com.badlogic.gdx.graphics.g2d.Batch; | |
| import com.badlogic.gdx.graphics.g2d.TextureRegion; | |
| import com.badlogic.gdx.graphics.glutils.ShaderProgram; | |
| import com.badlogic.gdx.math.Vector3; | |
| import com.badlogic.gdx.scenes.scene2d.Actor; | |
| import com.badlogic.gdx.scenes.scene2d.Group; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ✦ ✦✦ ✦ ✦ ✦ | |
| ★★ ✦ ★✶ ★☀✳✷ ✶ ★✦★✦ | |
| ★ ★✦ ☀✷☀✸★✦✳★✳✦✳✶☀✳☀★ | |
| ☀ ✦ ★✳✶✦☀★☀✳☀★☀ ✦✦✶★✷★ ✦✦ | |
| ★☀★✶✦✶★✳ ✦✳★ ✦✦ ✦★✳☀✦ ★ ✦ |